• Register
0 votes

Problem :

I am getting the bellow error:

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required. 

6 5 3
6,930 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

To resolve this issue I removed all java.exe, javaw.exe and javaws.exe from my Windows\SysWOW64 folder. 

Further Readings:

9 7 4
38,600 points
0 votes


On my Windows 7 machine, it was resolved by doing the following:

  1. In the START menu type "regedit" to open the Registry 

  2. Go to "HKEY_LOCAL_MACHINE" on the left-hand side registry explorer/tree menu

  3. Click on "SOFTWARE" within the "HKEY_LOCAL_MACHINE" registries

  4. Click on  "JavaSoft" within the "SOFTWARE" registries

  5. Click  on "Java Runtime Environment" within the "JavaSoft" list of registries

  6. Highlight "CurrentVersion" (should see it in the main registry key explorer window on the right)

  7. Alter version to "1.7"

That is all must work. Short of that, in case you've meanwhile attempted some other guides and/or messed up your registries, the most definite way to deal with the issue is to delete all previous versions of Java (employing "Programs and Features" uninstall process) and then re-install only the version you want to perform with. I'd indicate the distribution site at: http://java.com (as it generally has the most stable version)

I had various JDK from 1.5 to 1.7 installed on my PC. I had a require to learn JDK1.8 so installed and my prior versions of Eclipse (depended on earlier versions of JDK) and I got errors launching my Eclipse IDE, on the command line I attemted to check the Java Version and got the error below,

C:\>java -version
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.8', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.



from the PATH variable and moved %JAVA%\bin to the begin of the PATH variable, that resolved the issue for me.

set PATH=c:\Program Files\Java\jdk1.6.0_45\bin;%PATH%

this will perform in case you are working on command prompt

Furthermore, you may follow these steps :

  • Fixed JAVA_HOME to jdk[without bin folder]

  • Fixed PATH as %JAVA_HOME%/bin;

  • Place java.exe , javaw.exe & javaws.exe to C:\ProgramData\Oracle\Java\javapath [I was having problem here].

  • double click on the java.exe

  • Further check and edit the registry value for JAVA current version if necessary.

After attempting more than hundred of tricks, finally got success.

I removed all java.exejavaw.exe and javaws.exe 

  1. Windows\System32 and

  2. Windows\SysWOW64 folder. [Try step 2 if you have x64 system (Win 7 64 bits)]

In my instance (Windows 7 64-bit), I only did the following:

  • Removed the reference to C:\ProgramData\Oracle\Java\javapath; from the Path environment variable

  • Removed files javajavaw and javaws from the C:\Windows\System32 folder

Laterly, I closed all open command line consoles, reopened them and ran java -version.

10 6 4
31,120 points

Related questions

0 votes
1 answer 16 views
I am new to this. I just want to know how to do that? I have a Java project I am working on and I get this error.
asked Dec 19, 2020 TeamScript 9.2k points
0 votes
1 answer 12 views
Anyone have any clue how to fix this?
asked Dec 17, 2020 TeamScript 9.2k points
0 votes
1 answer 22 views
Problem: Hello Kodlogs, I am preparing for campus recruitment.I am going through most popular interview questions in java.However ,i am unable put the GCD of two number progrmatically.Could any one help me this?
asked Oct 8, 2020 kalyani456 280 points
0 votes
1 answer 15 views
I am finding the answers in several blog for removing particular character from string in java.
asked Sep 29, 2020 Daniel Anderson 4k points
0 votes
1 answer 10 views
I am finding difficulty with non repeated characters in a string in Java.
asked Sep 26, 2020 Daniel Anderson 4k points
0 votes
1 answer 18 views
I am finding the Java code to export data from a table in database to an Excel file. Can some one from kodlogs give me the right script?
asked Sep 26, 2020 Daniel Anderson 4k points
0 votes
1 answer 17 views
I need to know how to extract numbers from alphanumeric string in Java.
asked Sep 26, 2020 Daniel Anderson 4k points
0 votes
1 answer 9 views
I am finding the answers how to check string contains special characters in Java.
asked Sep 26, 2020 Daniel Anderson 4k points
0 votes
1 answer 10 views
I need to know how to remove the first cgaracter of a string in Java.
asked Sep 25, 2020 Daniel Anderson 4k points