Jdk download address:
Select the version that matches the computer system to be downloaded.
Because Java is already installed on my computer, I don't want to install it again. Java installation steps are very simple. If you don't want to change the installation path, click Next. When installing, remember your own installation path, because you will need it later. The default paths are: c: program file javajdk1.8.0 _161and c: program file javajre1.8.0 _1. The first is the path of jdk, and the second is the path of jre. If you don't want to install in the default path, please install in another path. It is recommended to install these two in the same directory.
JAVA environment variable configuration
Open this computer, right-click, select Properties to open System Settings, and then click Advanced Program Settings.
Then select the environment variable.
After opening the environment variable, click New System Variable.
I configured it here in advance, so all the variables are in it.
JAVA_HOME variable
The next step is to start creating a new JAVA_HOME variable. If you use the default installation path, you can copy it directly. My version is JDK1.8.0 _161,which is different after different versions.
JAVA_HOME
C: program file javajdk1.8.0 _161.
Path variable
Locate the Path variable in the system variable, select it and click Edit.
Then click New. It's all the same here You can copy it directly.
%JAVA_HOME%bin
Click "New" to ensure that the jre can run smoothly.
%JAVA_HOME%jrebin
ClassPath environment variable
Click the new system variable, and then enter the following in the New System Variable box.
Category path. % JAVA _ HOME % libdt . jar % JAVA _ HOME % libtools . jar
Please note that there is a quot. And quot;; In the front. It must be a symbol in English.
Finally, click OK, then click close, and the environment variable is set.
JAVA runtime environment verification
Click the Windows r key on the keyboard to open the operation prompt box, enter cmd, and press enter to open the command box.
Type javac and press Enter.
javac
Type java -version, and then press Enter.
Java version
This proves that your environment variable is set successfully.
Heart of the King 2 Click on the demo.