Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Error opening registry key

I get this error when I try to do anything with Java in command prompt:

Error opening registry key 'Software\JavaSoft\Java Runtime Environment.3' Error: could not find Java.dll Error: could not find Java 2 Runtime Environment 

I did screw around with deleting Java directories and registry a few days ago. I restarted computer and java was still working fine, then i restarted it again today and now I get this error. I have tried uninstalling and reinstalling but that doesn't seem to work. I have the latest java JRE installed and the path set in the environment variables. Anyone have any clue how to fix this?

like image 416
gFu Avatar asked Jun 15 '11 17:06

gFu


People also ask

What is registry key for Java?

A registry key is created under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall , which adds Sun Java System Web Server to the list of applications that can be uninstalled using the Add or Remove Programs functionality accessed from the Control Panel.

Where do you get JRE?

Downloading the Java Runtime Environment You can download the JRE free of charge from Oracle.


2 Answers

Make sure you remove any java.exe, javaw.exe and javaws.exe from your Windows\System32 folder and if you have an x64 system (Win 7 64 bits) also do the same under Windows\SysWOW64.

If you can't find them at these locations, try deleting them from C:\ProgramData\Oracle\Java\javapath.

like image 128
Baha Avatar answered Oct 01 '22 16:10

Baha


You will find a folder named "Oracle" on ProgramData folder in your windows installed drive. Remove the folder. Hope it will work. In my case my install drive is C and my path is C:\ProgramData\Oracle

like image 43
Shuvankar Paul Avatar answered Oct 01 '22 18:10

Shuvankar Paul