First, I will provide several Download Links Under the next JDK and eclipse (preferably to download the latest version) on the official website.
Jdk1.6 official download _ jdk6 official: http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe
Eclipse: unzip the http://www.newhua.com/soft/32289.htm to use.
Configuration process:
I. JDK Installation
JDK installation process is very simple, run the program directly, select the path to install on the line, my installation path is in c: \ Program Files \ Java \ jdk1.6.0 _ 10
2. configuring environment variables is more error-prone for beginners, so be careful.
Configure a total of three environment variables java_home class_path path
1. java_home
Right-click "my computer", select "properties", and click the "advanced" tab to create an environment variable. (I chose to set it under the system variable. the difference with the user variable is that different User Logon Settings under the system variable can be used, user variables are only valid for this user .)
Click create environment variable name java_home, variable value: C: \ Program Files \ Java \ jdk1.6.0 _ 10
2. class_path
The value of the new environment variable class_path is.; % java_home % \ Lib; % java_home % jdk1.6.0 _ 10 \ Lib \ tools. Jar
It must be noted that.; indicates the current path.
3. Path
No need to create a new one. Find path to add path; % java_home % \ JRE \ bin; % java_home % \ bin
Follow the steps above to complete the configuration.
3. Finally, you can run the Java, javac, and Java-version commands in cmd to test whether the installation is successful. If there is any information about Java, it will be correct.
Then you can create a project under eclipse and write a Java program (helloworld) to test the accuracy of the environment.
I believe that the above installation should be correct.
Note:
Path allows the system to identify Java commands in any path. class_path allows Java to load the class path only under the class_path path.
How to Set environment variables in cmd
In the "Start> Run" box, enter "cmd" and press "OK" to display the Command run window. Enter "set" in the command prompt to view the environment variable settings. To view the specific environment variable settings, for example, to view the PATH environment variable settings, you can enter "set path ". To create an environment variable, for example, to create an environment variable named AA with the value of "C:", enter the "set AA = C:" command. To delete an environment variable, for example, to delete the AA environment variable, you can enter the "set AA =" command (note = There is no space at the end ). How can I change the setting of an environment variable? There are two ways to change the environment variable: one is the append method, that is, to increase the value of the variable without changing the existing settings of the environment variable, for example, to add a setting with the value "D:" To the environment variable AA, enter "set AA = % PATH %; D :". The other method is completely modified. For this method, we can directly create an environment variable.