javac is not an internal or external command, nor is it a runnable program or batch file.

  1. New -> variable name "JAVA_HOME", value "C:\Java\jdk1.8.0_05" (that is, the installation path of the JDK)
    Insert picture description here

  2. Edit->Variable name "Path", add ";%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin" to the end of the original variable value, win10 remove the semicolon, and just separate the lines
    Insert picture description here

(3) New -> variable name "CLASSPATH", variable value ".;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;"
Insert picture description here
Note: modified environment Variables, need to reopen a new cmd window! !

Guess you like

Origin blog.csdn.net/weixin_45517802/article/details/109186909