Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'? [duplicate]

When I run: C:\Users\ashahria\Downloads>java -jar schemaSpy_5.0.0.jar

I get the error below. What is wrong? How can I fix it?

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

has value '1.5', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

like image 270
itro Avatar asked Dec 27 '11 13:12

itro


6 Answers

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

  1. In the START menu type "regedit" to open the Registry (be careful doing this)
  2. Go to "HKEY_LOCAL_MACHINE" on the left-hand side registry explorer/tree menu
  3. Click "SOFTWARE" within the "HKEY_LOCAL_MACHINE" registries
  4. Click "JavaSoft" within the "SOFTWARE" registries
  5. Click "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. Change version to "1.7"

That is all... should work. Short of that, if you've already tried some other guides and/or messed up your registries, the most certain way to deal with the problem is to delete all previous versions of Java (using "Programs and Features" uninstall process) and then re-install just the version you want to work with. I'd suggest the distribution site at: http://java.com (as it usually has the most stable version)

Or look for a specific version you need from Oracle's site: http://www.oracle.com/technetwork/java/javase/downloads/

like image 175
bcmoney Avatar answered Nov 09 '22 12:11

bcmoney


I had various JDK from 1.5 to 1.7 installed on my PC. I had a need to learn JDK1.8 so installed and my earlier versions of Eclipse (depended on earlier versions of JDK) and I got errors launching my Eclipse IDE, on the command line I tried 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.

Solution:- I removed

C:\ProgramData\Oracle\Java\javapath;
from the PATH variable and moved %JAVA%\bin to the start of the PATH variable, that solved the problem for me.
like image 25
user2257853 Avatar answered Nov 09 '22 11:11

user2257853


Go to 'c:/Windows/System32' and delete the java.exe, javaw.exe and javaws.exe there. See at Registry Key '...' has value '1.7', but '1.6' is required. Java 1.7 is Installed and the Registry is Pointing to it

like image 36
EastOcean Avatar answered Nov 09 '22 11:11

EastOcean


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

this will work if you are working on command prompt

like image 10
Deep Saxena Avatar answered Nov 09 '22 12:11

Deep Saxena


you may follow these steps :

  • set JAVA_HOME to jdk[without bin folder]
  • set PATH as %JAVA_HOME%/bin;
  • put java.exe , javaw.exe & javaws.exe to C:\ProgramData\Oracle\Java\javapath [I was having problem here].
  • double click on the java.exe
  • Also check and edit the registry value for JAVA current version if required.

it worked for me :)

like image 4
Cjo Avatar answered Nov 09 '22 12:11

Cjo


Your java version is 1.5 (you have jdk 1.5). The jar requires java version 1.7 (you should have jdk 1.7). You should download and install the 1.7 jdk from this website:

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html

like image 3
Adel Boutros Avatar answered Nov 09 '22 10:11

Adel Boutros