1. Open my computer -- properties -- Advanced --Environment Variable2. New System variables java_home and classpath: java_home variable value: C: \ Program Files \ Java \ jdk1.7.0Variable name: classpath variable value :.;% Java_home % \ Lib \ DT. jar; % java_home %\ Lib \ tools. jar;3. Select the environment variable named "path" in "system variables" and double-click the variable to add the absolute path of the bin directory in the JDK installation path to the value of the PATH variable, separate the half-width semicolon with an existing path. Variable name: PATH variable value:% Java_home % \ bin; % java_home %\ JRE \ bin; this is the Java environment configuration. After the configuration is complete, eclipse is started directly, and the Java environment configuration is automatically completed.
Classpath.; % java_home % \ Lib
Java_home c: \ Program Files \ Java \ jdk1.6.0 _ 10
Path; % java_home % \ bin
System variable: add the preceding environment variable and pass the test.
Reprinted from: http://hawaii162162.iteye.com/blog/646842
Many people often have a lot of trouble when deleting the JDK-even if they delete all Java-related files on the computer (but you usually cannot delete some files, the control panel still displays the Java icon, at this time, whether you uninstall JDK or you want to install the new version of JDK, there will be a serious error warning.
Someone wants to clear Java-related information in the registry using a tool such as a super rabbit or an optimization master, or manually delete them (it is dangerous to say that this is done, you may paralyze your brain), but what is the result? -- There is still an error warning. If you want to install a new JDK version, you cannot install it. If you want to delete the old JDK version, you cannot delete it. The only way you can think of is to reinstall the system. Reinstall the system? Who can accept this result?
Is there no other way to reinstall the system?
Of course, there are two solutions. Since the problem occurs in Java and the operating system, well, let's look for answers to them? Let's first look at Java to see what Sun gave us? Go to the Sun Company's official website, go to the help center, that is, the URL: http://java.com/en/download/help/uninstall_java.xml
We can see that some people have encountered the same problem here. It seems that this problem has a wide range. The solution provided by Sun is as follows:
If the normal uninstallation process (as mentioned above) fails, then please try Microsoft Windows Installer cleanup utility. this tool will ensure that all irrelevant Java Runtime Environment Microsoft Installer (MSI) registries are removed. detailed information and download is available at: Description of the Windows Installer cleanup Utility
We can see that it allows us to download a so-called Windows Installation and cleaning tool on the Windows official website, saying that this tool can clear the information in the Registry together, since sun has said this, we have to do it. After downloading this tool, we will use it to Uninstall Java. At this time, you will find that your new JDK can be installed.
Suggestions:
(1) install JDK on drive C as much as possible, because there are some java-related files provided by the system.
(2) To uninstall JDK, first add/delete it in the control panel.ProgramIf the tool cannot be deleted, use the tool above to delete it.
(3) Before You uninstall JDK, delete the classpath in the environment variable and remove the Java-related part in the path.
Address: http://java-cd.iteye.com/blog/537557
Windows cleanup tool address: http://down.tech.sina.com.cn/page/16877.html