Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

the registry refers to a nonexistent java runtime environment installation

2903535Mar 13 2015 — edited Mar 16 2015

I was having trouble running some Java programs (not my own) in Windows XP, and in the process I uninstalled and installed JRE versions 6, 7, and 8, one at a time, probably in the order 7, 8, 7, 6, 7. The program that had the original problem only worked in V6, but some other programs stopped working. I went back to V7, and those other programs still didn't work. The message was "the registry refers to a nonexistent java runtime environment installation". The only advice I could find with Web searches was to reinstall the JRE. Needless to say, that didn't work.

So I looked at the registry, and I found that there were still references to V8, which had been uninstalled. The first was

HKEY_CLASSES_ROOT\jarfile\shell\open\command - (Default) = "C:\Program Files\Java\jre1.8.0_31\bin\javaw.exe" -jar "%1" %*

The folder re1.8.0_31 doesn't exist, so I changed it to jre7. That didn't work.

Then I found

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment - CurrentVersion = 1.8

I changed this to 1.7, and deleted some following entries such as

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8 - JavaHome = C:\Program Files\Java\jre1.8.0_31

retaining entries such as

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7 - JavaHome = C:\Program Files\Java\jre7

That worked!

So, there is a bug in the installer(s): if you uninstall V8 and install V7, the 'CurrentVersion' isn't set correctly, with the result that the registry points to a non-existent folder. The V8 uninstallation should delete these entries, or the V7 installation should change them.

Question: Where do I report this bug? Or, better still, would someone report if for me? :-)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2015
Added on Mar 13 2015
2 comments
4,108 views