Java environment configuration in Windows
1. Download JDK
Go to the http://java.sun.com to download the JDK version you need.
2. Install JDK
Double-click the downloaded file and install JDK in the specified directory.
E.g. D: \ j2sdk
3. Configure Environment Variables
A. Right-click my computer and choose Properties> advanced> environment variables.
B. Click the new button in the system variable area to bring up a new window,
Set the variable name to java_home,
Enter the variable value in the JDK installation directory.
E.g. D: \ j2sdk and click OK.
C. Edit the PATH variable in the system variable area
% Java_home % \ bin;
% Java_home % \ JRE \ bin;
Add to path.
If Oracle is installed, it must be added before the setting of oralce.
4. Test
"Start" --> "run" --> "cmd", enter
C: \ Documents ents and Settings \ Administrator> JAVA-version
The following message is displayed:
Java version "1.4.2 _ 04"
Java (TM) 2 Runtime Environment, Standard Edition (build 1.4.2 _ 04-b05)
Java hotspot (TM) Client VM (build 1.4.2 _ 04-b05, mixed mode)
The installation is successful.
** Small experience **
1) Remove the version number from the software installation directory name, e.g. D: \ j2sdk
This is very convenient to cope with software upgrades!
2) In environment variable settings, % variable % can be used to replace the variable value.