Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when checking Java version: could not find java.dll

Tags:

java

runtime

why do I get this? How can I fix it?

C:\Users\ash>java version Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.7.0_01', but '1.7' is required. Error: could not find java.dll Error: Could not find Java SE Runtime Environment. 
like image 481
itro Avatar asked Feb 16 '12 14:02

itro


People also ask

How do I fix a missing Java DLL?

Reinstalling the program may fix this problem. java. dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vender for support.

How do you find errors in Java?

Evaluating (watch and inspect): This allows you to check the value of expressions while debugging Java programs. Right-click the statement and click on inspect. It will show you the value of the selected expression during the debugging process. The value will appear in front of you over the watch window.


2 Answers

The accepted solution for Reinstalling ALL JDKs was a bit harsh. I too experienced this problem and here is my 2 cents:

This problem started happening since I installed JDK 8 and still had JDK 6 installed. I need for different projects I'm working on.

I noticed I had both a User and a System %JAVA_HOME%, so I removed my User %JAVA_HOME% variable and left only the system one.

I also noticed that in my Oracle installation there was some Java executables and I believe those where the ones conflicting since both my Oracle and Java installations were in my %PATH% variable.

I removed all Java paths from my %PATH% Variable and only left the %JAVA_HOME%\bin at the start of the variable for avoiding any conflicts with the Oracle installation.

like image 109
ffleandro Avatar answered Sep 22 '22 19:09

ffleandro


I had a similar issue after installing the java 1.8.

To fix this go to Advance System setting --> path and remove

C:\ProgramData\Oracle\Java\javapath;

like image 37
Rohit Jain Avatar answered Sep 22 '22 19:09

Rohit Jain