Java environment installation tutorial

First, download JDK and JRE from the official website

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Write picture description here

Click in and select the corresponding operating system to download and install

Write picture description here

Next, the second step, environment variable configuration

Write picture description here

1. Create a new "JAVA_HOME" system variable, the value is: D:\jdk (this is the installation directory just now, write it yourself)
2. Create a new CLASSPATH system variable, the variable value: .;%JAVA_HOME%\lib\dt.jar ;%JAVA_HOME%\lib\tools.jar; (pay attention to the dot and semicolon in front, which means that all files in the directory or subdirectory are applied, or write .;%JAVA_HOME%\lib; that’s it)
3. Create a new PATH variable, variable value: %JAVA_HOME%\bin;
Next, check whether the configuration is complete, press win+R to open the command prompt, enter java to get javac, and the following interface appears, the configuration is successful

Write picture description here

Tip: If it appears that'JAVAC' is not an internal or external command, nor an executable program or batch file, just repeat the above operation

Guess you like

Origin blog.csdn.net/geekerstar/article/details/52589663