---------begin---------
Steps:
1. Download the JDK;
2. Install the JDK;
3. Configure the JDK;
------------------------
First, download the JDK;
1. Login URL:www.oracle.com
2. Click Downloads
3. Select Java SE
4. Select Java SE (includes JavaFX)
5. Click JDK Download
6. Select Accpet License Agreement
Version corresponds to:
Windows x86--32-bit operating system
Windows x64--64-bit operating system ()
Download complete;
Second, install the JDK;
1. Select the path to install (default C: Disk)
2. Click Next (until the installation is complete)
Third, configure the environment
You need to set Java_home, CLASSPATH, path three environment variables.
1. Select Advanced System Settings
2. Select "Advanced" "Environment variable"
3. Configure Java_home:
Click New, variable name: java_home, Variable value: C:\Program files\java\jdk1.7.0_45 (Path of JDK installation)
4. Configuring the Classpath Property
Click New variable name: CLASSPATH, Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;
The most important thing to note at this time is the first. , can't forget,%java_home% represents C:\Program files\java\jdk1.7.0_45 (Path of JDK installation)
5. Set Path
Select Path, edit, add variable value:%java_home%\bin;%java_home%\jre\bin;, this property is generally there, just add it, pay attention to the problem of semicolons.
Third, check that the installation is successful
Run "Java-version", "Java", "Javac" three commands
-----End-----
Link:
Why set the Java environment variable (detailed)
Java Installation and Environment collocation