Windows manages multiple versions of Java-solutions to ' has value ' 1.8 ', but ' 1.7 ' is required ' method

Source: Internet
Author: User
Tags java se

The company takes into account the code's sustainable maintenance, requires all use of java7, and wants to learn some JAVA8 's new features in idle time, so after installation of 1.7 and installed 1.8, resulting in eclisp in the start times ' have value ' 1.8 ', but ' 1.7 ' is Required ' ERROR, the query found in console use, Java -version will still be reported ' has value ' 1.8 ', but ' 1.7 ' is required ' error, as follows

1 C:>java-23 has the value ' 1.8 ', but '1.74  5 error:could not find Java SE Runtime environment.

Here, only 1.7 is configured in the environment variable, and no environment variable value is configured for 1.8.
After a period of groping, the system default JDK can be restored to 1.7 by modifying the following steps:

1. Modify the Registration Form

Open Hkey_local_machine\software\javasoft
Modify the CurrentVersion value in Java Development Kit and Java RUNTIME Environment respectively to 1.7

2. Replacing files

Copy the Java.exe Javaw.exe Javaws.exe in%java7_home%\bin to C:\windows/system32 and C:\Windows\SysWOW64 and replace the original file. Copy the shortcuts of the above three files to C:\ProgramData\Oracle\Java\javapath and replace the original files

If you do not replace the file, the following problems may occur;

C:>java-version error:registry key ' Software\javasoft\java Runtime environment ' \currentversion ' has value ' 1.8 ', but ' 1.7' is required. Error:could not find Java.dll error:could not find Java SE Runtime environment.

3, java -version the implementation of verification

1 C:>java-2 Java version "1.73 java (TM) SE Runtime Environment (build 1.) 7.0_25-4 Java HotSpot (TM) 64-bit Server VM (build 23.25-b01, Mixed mode)

Windows manages multiple versions of Java-solutions to ' has value ' 1.8 ', but ' 1.7 ' is required ' method

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.