How to set JDK environment variables?

When re-downloading the JDK installation package and configuring environment variables for it. When using the following command in cmd to check the version of the Java runtime environment, it is empty, and no results can be obtained.

java -version

Later, it was found that the original JAVA_HOME variable needs to be deleted first, and then added again. (This step should be omitted, mainly the next step)
Find and double-click the path variable, and add a line below it with the following content;
(Do not add the ; sign, I added it at the beginning, and later found that removing the semicolon is fine)

%JAVA_HOME%\bin

Then add a line below:

%JAVA_HOME%\jre\bin

Guess you like

Origin blog.csdn.net/qq_45926254/article/details/129356373