Oracle installed new version and hosed my Java environment

0

Oracle installed a new version a day or two ago. Now I go to use it and I get:

C:\JavaTools>java -version
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

(I find 'Software\JavaSoft\Java Development Kit' in the registry, but no 'Java Runtime Environment'.)

No doubt something has been hosed in my path or registry or whatever, but I haven't a clue what. Any ideas?

(I did find this but it doesn't appear to address quite the same case. I didn't intentionally muck with any of the Java config, just said "OK" when Oracle asked to update my existing config.)

Cygwin finds these versions of java.exe -- I have no idea which one Oracle has supposedly been updating:

/cygdrive/c/Program Files/Java/jdk1.7.0_07/bin/java.exe
/cygdrive/c/Program Files/Java/jdk1.7.0_07/jre/bin/java.exe
/cygdrive/c/Program Files (x86)/Java/jre7/bin/java.exe
/cygdrive/c/Windows/System32/java.exe
/cygdrive/c/Windows/SysWOW64/java.exe

The only version of javac.exe I could find was at:

/cygdrive/c/Program Files/Java/jdk1.7.0_07/bin/javac.exe

%path% includes:

C:\"Program Files"\Java\jdk1.7.0_07\bin\

(I know I shouldn't have said "OK" when Oracle asked to update, but I was busy with something else and wanted to get it out of the way. That'll teach me!!)

Update: I finally just deleted and reloaded Java. One thing I was unsure of is whether I should touch the java.exe instances in Windows\System32 and Windows\SysWOW64 -- the old ones are still there, but don't seem to cause trouble. (I did delete the other paths, finally, after finding and killing the background job that was referencing some of he files.) Had to manually update %path% with the new version number. But Java seems to be working again.

Daniel R Hicks

Posted 2014-07-23T20:31:57.783

Reputation: 5 783

1

In Java control panel make sure the path for User and System set as C:\Program Files (x86)\Java\jre7\bin\javaw.exe screenshot here, with this setting java -version is working fine.

– Ĭsααc tիε βöss – 2014-07-31T11:00:50.700

Answers

0

Reinstall JDK and sets system variable. See link

https://www.java.com/en/download/help/path.xml

user3765901

Posted 2014-07-23T20:31:57.783

Reputation:

That doesn't seem to be much help. – Daniel R Hicks – 2014-07-23T21:39:06.877

I'm sorry, but if you want to get your Java RE up and running in a quickest way possible, you will reinstall. Takes max 10 minutes and is proven to work (for me at least). – Kitet – 2014-07-30T20:07:37.797