英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论