From: http://blog.sina.com.cn/s/blog_4fcc6ef20100vzo3.html
It took me a few hours to get JDK today. After installation, I found that there are no tools. jar and DT. Jar packages in JDK \ Lib. I found many solutions on the Internet, but they did not solve the problem. Finally, we can see an essential solution. The cause of this problem is that JDK and JRE are placed in the same directory during JDK installation, resulting in file overwrite, resulting in tools. jar and DT. jar package overwrite.
Solution:
My operating system is win7. During JDK installation, the second selection of the target folder is to select a directory different from the first installation directory.
For example, the first installation directory is c: \ JDK.
The second installation directory is c: \ JRE.
After installation, you can view the tools. jar and DT. Jar packages under c: \ JDK \ Lib.
Then, set the environment variable to run the Java program normally.
Environment variable settings:
Java_home:C: \ JDK
Path:% SystemRoot % \ system32; % SystemRoot % \ system32 \ WBEM; % java_home % \ bin;
Classpath:.; % Java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar;
This interface is successful !!!
----- If it succeeds, you can install a development environment.