gpt4 book ai didi

windows-7 - 找不到 javac - 在 Windows 7 64 位上为 JDK 设置了 CLASSPATH/Path/JAVA_HOME

转载 作者:行者123 更新时间:2023-11-30 11:52:40 25 4
gpt4 key购买 nike

我在这里和 Google 上查看了很多主题,但找不到解决方案。

我已经在我的 64 位 Windows 7 上安装了最新版本的 Java JDK (1.6.0_26)。我添加了文件路径“C:\Program Files (x86)\Java\jdk1.6.0_26”到 JAVA_HOME,并在 CLASSPATH 和 PATH 变量中添加“C:\Program Files (x86)\Java\jdk1.6.0_26\bin”。我已经重新启动了我的机器。但是,当我从命令行运行 javac -version 时,我收到错误

'javac' is not recognized as an internal or external command, operable program or batch file.

请让我知道我该怎么做!我正在尝试使用 Appcelerator 的 Titanium,但它需要有效的 javac 路径。谢谢!

作为引用,这是我的 PATH 变量。

C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x8
6)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\
Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Fil
es\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Progra
m Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shar
ed\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:
\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (
x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\
OEM\AudioCore\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\WIDCO
MM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64; C:\
Program Files (x86)\Java\jdk1.6.0_26\bin;

最佳答案

错误如其所言。 javac is not found on the path.(此问题与Java无关,而是windows无法在当前路径中找到不合格的可执行文件或搜索“PATH”路径。)

手动找到 javac 文件。验证它可以使用找到的路径运行。

确保路径正确地放入 PATH 环境变量中(它必须用分号 (;) 与其他条目分隔)。 CLASSPATH 与此处无关。根据 PATH 的设置方式,可能需要重新启动 Windows shell(例如注销并重新登录)。使用来自控制台的 echo %PATH% 验证新 PATH 是否正确。

运行 javac 并验证它是否已执行。

快乐编码。

关于windows-7 - 找不到 javac - 在 Windows 7 64 位上为 JDK 设置了 CLASSPATH/Path/JAVA_HOME,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6712701/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com