【发布时间】:2011-07-15 20:18:34
【问题描述】:
我在这里和 Google 上查看了许多主题,但找不到解决方案。
我在 64 位 Windows 7 上安装了最新版本的 Java JDK (1.6.0_26)。我添加了文件路径“C:\Program Files (x86)\Java\jdk1.6.0_26”到 JAVA_HOME,并将“C:\Program Files (x86)\Java\jdk1.6.0_26\bin”添加到 CLASSPATH 和 PATH 变量中。我已经重新启动了我的机器。但是,当我从命令行运行 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;
【问题讨论】:
-
好吧,为什么会有多余的空格 (" ")?
-
"C:\Program Files (x86)\Java\jdk1.6.0_26\bin" 确实是正确的,额外的空间就是答案!非常感谢,我知道我做的一切都是正确的,这就是为什么它让我觉得它不起作用。好吧,几乎一切都正确;)
-
当小事变得如此细微时,这很烦人!编码愉快。
标签: windows-7 path classpath java javac