Some pits encountered in configuring jdk environment variables

Project scene:

       Today, the training room has a new teacher and talks about the backstage teacher. There was a problem reinstalling jdk, and the environment variables have not been properly configured. The teacher said that the issue of matching java jdk environment variables has always been a metaphysics, and I was thinking about metaphysics belching, isn't it just missing a symbol.


Problem Description:

Insert picture description here

C:\Users\Administrator>javac
'javac' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Users\Administrator>

Cause Analysis:

In the configuration environment variable path pay more when a semicolon ";"

Insert picture description here
C: \ Program Files \ nodejs; the back end of the semicolon to be deleted, and then add. Insert picture description here
In fact, you can find the Path variable directly in the system variables. This Path is your own, so you don't need to add Path yourself! ! ! Just add it at the end and it's done.
The semicolon ";" is really a headache,


solution:

Just remove the nodesjs\ ";" behind him . Just add it.

;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin       

It doesn't matter if the last semicolon is added or not. After adding, cmd enters javac and prompts as follows and Insert picture description here
it is successful.

Guess you like

Origin blog.csdn.net/qq_43055855/article/details/109159440