简体   繁体   English

javac无法识别为内部或外部命令

[英]javac isn't recognized as an internal or external command

I know this question has been asked a lot of times, but I tried a lot of solutions and none of them work. 我知道这个问题已经被问过很多次了,但是我尝试了很多解决方案,但都无济于事。 If I write "path" in prompt, I get this: 如果我在提示符下输入“ path”,则会得到以下信息:

PATH=%CommonProgramFiles%\Microsoft Shared\Windows Live;C:\Windows\system32;C:\W
indows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\P
rogram Files (x86)\ATI Technologies\ATI.ACE\Core-Static; ;C:\Program Files\Commo
n Files\Microsoft Shared\Windows Live; C:\Program Files\Java\jdk1.7.0_45\bin;

So, it seems correct. 因此,这似乎是正确的。 What should I do? 我该怎么办?

There is an extra space in front of C:\\... Remove that. C:\\...前面有多余的空间C:\\...删除它。

...; C:\Program Files\Java\jdk1.7.0_45\bin;
    ^

Cheers, 干杯,

C:\Program Files\Java\jdk1.7.0_45\bin;

在这行之前有多余的空间。

in Windows environment you can set path in two ways 在Windows环境中,您可以通过两种方式设置路径

1) Temporary set path 1)临时设定路径

open cmd(command prompt) start ---> run --- type cmd ----hit enter in the cmd type this 打开cmd(命令提示符)开始--->运行---输入cmd ----在cmd中输入以下内容

set path hit enter Ex: set path C:\\Program Files\\Java\\jdk1.6.0_29\\bin 设置路径点击Enter Ex:设置路径C:\\ Program Files \\ Java \\ jdk1.6.0_29 \\ bin

this will set path to current cmd window only 这只会将路径设置为当前的cmd窗口

2) Permanently set path 2)永久设置路径

right click my computer----- > properties -----> Advance ----> Environment variables ---->inside system variable Group box select path click edit,in opend window variable value text box put ; 右键单击我的电脑->属性->高级->环境变量->在系统变量内部,在组框中选择路径,然后单击编辑,在打开的窗口中将变量值文本框放进去; at the last and past the path of your jdk directory's bin -----> select ok 在jdk目录的bin路径的最后和过去----->选择ok

now open the cmd type path command see... that path in the out put text 现在打开cmd type path命令,看到...输出文本中的该路径

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Javac无法识别为内部或外部命令 - Javac isn't recognized as internal or external command javac无法识别为内部或外部命令 - javac not recognized as an internal or external command 'javac'未被识别为内部或外部命令 - 'javac' is not recognized as an internal or external command 在Windows 7中,javac不被识别为内部或外部命令 - javac is not recognized as an internal or external command in windows 7 错误 -'javac' 不是内部或外部命令,也不是可运行的程序或批处理文件 - Error -'javac' is not recognized as an internal or external command, operable program or batch file $不被识别为内部或外部命令 - $ is not recognized as an internal or external command 添加到 PATH 后,'javac' 未被识别为内部或外部命令、可运行的程序或批处理文件 - 'javac' is not recognized as an internal or external command, operable program or batch file after adding to PATH 'javac' 不是内部或外部命令,也不是可运行的程序或批处理文件。 在 VS Code 中,使用 Code Runner 扩展 - 'javac' is not recognized as an internal or external command, operable program or batch file. in VS Code, using Code Runner extension C:\\ Program Files \\ Java \\ jdk1.8.0_131 \\ javac.exe“'无法识别为内部或外部命令 - C:\Program Files\Java\jdk1.8.0_131\javac.exe"' is not recognized as an internal or external command 错误“'JDK版本'javac'不被识别为内部或外部命令”,当试图运行一个简单的Titan项目时? - Error “'JDK version 'javac' is not recognized as an internal or external command,”When trying to run a simple titanium project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM