简体   繁体   中英

JDK, javac not recognized

I've recently installed java and have added it to my PATH Variables on my Windows 10 machine.

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

However I receive the error that javac is not present in the directory when trying to compile my program. 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的错误

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 .

You can also reference other variables in your path variable:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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