First of all, search the JDK download on Baidu;
This is the website of JDK download, Java is now the product of Oracle company, click Javadownload;
Choose a version that matches your computer, and don't forget to check the agreed user agreement above.
Double-click the downloaded file;
This is the installation interface, click Next to Good;
You can change the path and recommend that you do not need to change it, because the environment variable configuration is followed;
Wait for installation;
Download the JDK with the installation of JRE, if you do not need JRE, you can download a separate JDK, click Next to install the JRE;
Wait for completion, install the environment variable configuration, configure the environment variable is to ensure that in each letter can execute JAVAC command;
Environment variables found in the computer-attribute-Advanced system settings-environment variables, user variables and system variables, first find path in the user variable, and then add the path of bin in the installed JDK in the variable value and paste it into the path variable value;
Open a command prompt, enter Javac, as shown in the image above, the user variable environment is good, then the system variable;
Or find environment variable settings, create a new system variable, named Classpath, will save the. java file and the path of the. class file on the fill;
Then compile a written Java code, and execute it, if successful, indicating that the environment variable has been configured;