简体   繁体   English

JDK、javac 无法识别

[英]JDK, javac not recognized

I've recently installed java and have added it to my PATH Variables on my Windows 10 machine.我最近安装了 java 并将其添加到我的 Windows 10 机器上的 PATH 变量中。

JDK in the System Path Variables系统路径变量中的JDK系统路径变量中的JDK

However I receive the error that javac is not present in the directory when trying to compile my program.但是,在尝试编译我的程序时,我收到目录中不存在 javac 的错误。 This is probably a simple question but the other answers I have found are for people who don`t have the path at all.这可能是一个简单的问题,但我找到的其他答案适用于根本没有路径的人。

Error of no javac没有javac的错误

没有javac的错误

I would appreciate any and all help you can provide.我将不胜感激您能提供的任何帮助。

You need to add the path of your JDK to the Path variable not in the variable Java Developement Kit .您需要将 JDK 的Path添加到Path变量中,而不是在变量Java Developement Kit

You can also reference other variables in your path variable:您还可以在路径变量中引用其他变量:

|----------------------|-----------------------|
| Variable             | Value                 |
------------------------------------------------
| JAVA_HOME            | C:\Program...         |
------------------------------------------------
| Path                 | ...%JAVA_HOME%\bin;.. |
------------------------------------------------

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM