"Go" Windows7 install JDK 7 O'Clock version conflict problem resolution

Source: Internet
Author: User

Original URL: http://wxl24life.iteye.com/blog/1966058

The JDK version that has been used on my computer is 1.6, today I decided to update to 1.7, after installing JDK 1.7, the console input Java command Test whether the installation is successful when the error:

Other code
    1. C:\users\wxl24life>java
    2. Registry key ' Software\javasoft\java Runtime environment\currentversion '
    3. Have value ' 1.7 ', but ' 1.6 ' is required.
    4. Error:could not find Java.dll
    5. Error:could not find Java SE Runtime environment.

The source of this error is this: When you decide to install JDK 1.7, you did not uninstall the previously installed JDK 1.6, causing the system to contain two versions of the JDK-related components, possibly due to version conflicts that caused the error.

I started to want to keep two versions of the JDK by switching the version of the JDK I wanted to use, even if I changed the registry by a certain setting. So, in order to get rid of the above error, I try to see the values of the entries under [Hkey_local_machine\software\javasoft\java Runtime Environment] in the registry, all of which are discovery issues. Of course also tried to change some of the values, the error is still.

Finally, I had to give up hope of keeping two versions.

---

Here's the solution:

    • If you want to use a JDK version of the original 1.6. The simplest way is to modify "CurrentVersion" in [Hkey_local_machine\software\javasoft\java Runtime Environment] to "1.6"
    • If you want to update to the new JDK 1.7, you can only remove the JDK 1.7 by completely uninstalling the installation and then reinstalling the JDK . Uninstall method: Control Panel-Uninstall the program, and then uninstall the JDK, the JRE. Make sure that the previous installation directory (such as C:\Program Files\java) has been emptied after uninstallation.

Note: After installing the new JDK, remember to modify the PATH environment variable.

"Go" Windows7 install JDK 7 O'Clock version conflict problem resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.