Although there are a lot of similar articles on the Internet, the first time to take a look at the online article, but in order to make a record, I also write, record a bit.
First is to install JDK,JDK download can go directly to the official website to download, address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Right center left picture that shows the latest Java version, Java Platform (JDK) 10, now the latest version is already java10. If you want to download the previous version, pull the page down to the bottom, and click to see the various historical versions
Here I choose the latest version 162 of Java SE 8, 64-bit window version, accept license Agreement, and then select the corresponding version of the download, you will need to log in to the Oracle account when downloading,
If not, register one on it. Download down and double click to install it.
After the installation is complete, the next step is to configure the environment variables
1. Right click on "My Computer", click "Properties", select "Advanced System Settings"
2. Select the "Advanced" tab and click on "Environment variables"
Set 3 properties in "System variable", Java_home,path,classpath (case does not matter), if already exist then click "Edit", not exist then click "New".
The variable setting parameters are as follows:
- Variable name:java_home
- Variable value:C:\Program Files (x86) \java\jdk1.8.0_91 //To be configured according to your actual path
- Variable name:CLASSPATH
- Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; Remember, there's a "." in front.
Variable name:Path
Variable value:%java_home%\bin;%java_home%\jre\bin;
Note: in Windows10, because of system limitations, the PATH variable can only use the JDK's absolute path. The%java_home% will not be recognized, causing the configuration to fail. As shown below:
c:\program files (x86\java\jdk1. 8.0_91\bin;:\program files ( Span class= "PLN" >x86) \java\jdk1. 8.0_91\jre\bin
So it's done.
Test whether the JDK was installed successfully
1, "Start", "Run", type "cmd";
2, type the command: java-version,java,Javac A few commands, are recognized, is already successful
Java Development Environment Configuration (Windows System)