我已经在我的 Windows 7 机器上安装了 Java。接下来,我JAVA_HOME
在环境变量中添加了用户变量,并放入JAVA_HOME
变量path
中,如下所示:
%JAVA_HOME%\bin
当我从命令行运行echo %JAVA_HOME%
时,我得到C:\Program Files\Java\jdk1.7.0_17
. 而且,当我跑步时echo %path
,我得到:
C:\Program Files (x86)\DNASTAR\SeqMan NGen 3;C:\Program Files (x86)\HP SimplePas
s 2011\x64;C:\Program Files (x86)\HP SimplePass 2011\;;C:\Program Files\Broadcom
\Broadcom 802.11\Driver;;C:\Program Files\Common Files\Microsoft Shared\Windows
Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Window
s\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerS
hell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI
Technologies\ATI.ACE\Core-Static;C:\Program Files\WIDCOMM\Bluetooth Software\;C
:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Broadcom\WH
L\;C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WHL\SysWow64
\;C:\Program Files\Broadcom\WHL\SysWow64\syswow64;C:\Program Files (x86)\Intel\S
ervices\IPT\;%JAVA_HOME%\bin
但是,当我尝试javac
从该bin
文件夹运行时,出现以下错误:
'javac' is not recognized as an internal or external command,
operable program or batch file.