Record JDK installation process and resolve javac is not an internal or external command

Record the installation process:
First, the URL
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Here Insert Picture Description
click the red circle, find their own computer version applicable here is the 64-bit windows

Here Insert Picture Description
In the pop-up box asking tick

Here Insert Picture Description
After the download is complete, double-click the installation, (because I installed a screenshot of the steps will be omitted when the installation) is recommended installed in the C drive , I remember the installation path is here:

the installation is complete.

Second, configure the environment variables
after the installation is complete, right-click on "this computer", select properties, advanced system settings, environment variables
Here Insert Picture Description
in the system variable check or add the following variables in:
1.JAVA_HOME, the value of your JDK installation path
Here Insert Picture Description
2.CLASSPATH , value;.% JAVA_HOME% \ lib; % JAVA_HOME% \ lib \ tools.jar noted dot semicolon
Here Insert Picture Description
3. Double-Path variable is added;% JAVA_HOME% \ bin and;% JAVA_HOME% \ jre \ bin
Here Insert Picture Description
that each time should click OK

Complete configuration environment variable.

Third, the detection JDK is installed completely
win + R to open the Run, enter cmd
Here Insert Picture Description
1. Enter java, see if there is the following:
Here Insert Picture Description
this step the OK
2. Enter javac
where I appeared javac is not an internal or external command prompt (because now the problem has been resolved, on the internet to find the chart)
Here Insert Picture Description
said here the solution in my case, not necessarily all of my case are
in fact my situation is very simple, I did not look carefully when configuring the environment variable version of jdk may be I installed jdk long time ago, so that the environment variable to write an older version
I now have two versions
to the environment variable path into the newly installed it
now re-enter javac
Here Insert Picture Description
appear this interface on it

Summary
fact other cases are also configured with environment variables, be careful to check whether it is editing system variables , JDK installation path is fill in the three environment variables have not added on

Released three original articles · won praise 0 · Views 78

Guess you like

Origin blog.csdn.net/qq_43446007/article/details/104594007