1. Download jdk from the official website. The latest version is jdk8.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html。
Select the corresponding jdk file according to the version of your own system, pay attention to be sure to select the correct file.
On the jdk download official website, it is divided into x86 and x64.
x86 stands for 32-bit system.
x64 stands for 64-bit system.
2. Set environment variables
Right click on this computer, select properties, select Advanced system settings.
In Advanced click Environment Variables.
Create a JAVA_HOME variable, the variable value is the installation location of java,
My installation location is C:\Program Files\Java\jdk1.8.0_131
Create a CLASSPATH variable with the value of .;%JAVA_HOME%\lib;%JAVA_HOME%lib\tools.jar
Select the path variable and create %JAVA_HOME%\bin and %JAVA_HOME%\jre\bin in the path variable
Because win10 is automatically branched, there is no need to add;
Click OK when finished.
3. Check whether the jdk is installed successfully
Win+R shortcut key, open the run window, enter cmd
Enter java command
Enter the javac command
Enter java -version
The result is as shown in the figure above, indicating that you can install jdk correctly
4. Install eclipse
Download the eclipse installation package from the official website, remember! It must be the same as the number of digits in the system.
The download address of the official website is: https://www.eclipse.org/downloads/