javac is neither an internal command nor an external command

It appeared today when running the java program with the command line javac 不是内部命令也不是外部命令, but the input javais indeed possible. After reading online tutorials, the method is basically the same. However, my installation files are a bit different, mine jdk文件and jre文件are separate, and most of the online are jre文件subordinate jdk文件.
As shown in the figure: In
write picture description here
this way, the environment variable JAVA_HOMEcannot only have the corresponding directory like the one on the Internet jdk文件, so I canceled this variable and used the path directly.
As shown below:
write picture description hereThat" ."Forget it! And
this one in Path has moved to the top. Finally restart cmd,
write picture description here
重启cmd!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325726525&siteId=291194637