‘javac’ 不被识别为内部或外部命令、可操作的程序或批处理文件。

huangapple go评论86阅读模式
英文:

CMD/PowerShell: 'javac' is not recognized as an internal or external command, operable program or batch file

问题

我已安装了VSCode、VSCode Java扩展、最新版本的Java和Oracle JDK。

当我在cmd/PowerShell中输入javac时,它显示:'javac'不被识别为内部或外部命令、可操作的程序或批处理文件。

此外,当我搜索文件“javac.exe”时,什么都没有出现。

我已经查看了其他类似的问题,尽管没有人遇到完全相同的问题。

任何帮助将不胜感激!

英文:

I have installed VSCode, VSCode Java extension, the newest version of Java, Oracle JDK.

When I type javac into cmd/PowerShell it says: 'javac' is not recognized as an internal or external command,
operable program or batch file.

Also, when I search for the file "javac.exe", nothing comes up.

I have looked at other problems similar to this, although none of the people are having the exact same problem.

Any help would be really appreciated!

答案1

得分: 4

You only need to add the Java bin location to the global PATH variable. So, you will be able to execute Java commands anywhere on the computer.

See: https://www.java.com/en/download/help/path.xml

英文:

You only need to add the Java bin location to the global PATH variable. So, you will be able to execute Java commands anywhere on the computer.

See: https://www.java.com/en/download/help/path.xml

huangapple
  • 本文由 发表于 2020年8月3日 00:47:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/63218620.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定