registry refers to a nonexistent JRE

OS: Windows 10
CPU: Intel Core i7 2.67GHz
Memory: 6 GB
Video: ASUS R9 280
VASSAL: 3.1.17
Java: 1.8.0_121

I just installed Vassal for the first time. When I run it I get. “The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted. The system cannot find the file specified.”
I’ve read about similar issues and tried the suggestions and haven’t found a fix yet.
I’ve installed the latest JRE, and rebooted afterwards.

From a command prompt, “java -version” works fine.
I checked the registry, HKLM/SOFTWARE/JavaSoft/Java Runtime Environment/CurrentVersion is 1.8
HKLM/SOFTWARE/JavaSoft/Java Runtime Environment/1.8/JavaHome is correct (E:\Program Files\Java\jre 1.8_0_121).

I do have several versions of the JDK installed, but I don’t think that should matter.

Any other ideas about what to check? Any way to figure out what registry entry it’s looking at, and what file it thinks doesn’t exist?

To find out what’s going on, grab a copy of Process Monitor from Microsoft (previously SysInternals). This is able to log a ridiculous amount of activity from all processes on the system, so make sure you filter it. I would set a filter for “Path contains JavaSoft” and check what registry keys it is accessing before the error occurs.

Thanks, that solved it. Or at least, helped me to solve it.

For the benefit of anyone else having this problem, here’s what the program was doing:

  • It did NOT look at HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion
  • It enumerated all JRE’s in HKLM\SOFTWARE\JavaSoft\Java Runtime Environment and found 1.8.0_121
  • It enumerated all JDK’s in HKLM\SOFTWARE\JavaSoft\Java Development Kit and found 1.7.0_79, 1.8.0_101, 1.8.0_40
  • It took the alphabetically last JDK it found, which was 1.8.0_40, and tried to use that
  • It tried find find jre/bin/javaw.exe in that directory and failed.

I solved it be uninstalling JDK 1.8_0_40

Sounds like the same issue that has occurred the past few Java updates.
I’m not a technical expert on these things, but there seems to be an issue with the automatic Java updater not removing all older Java references, so you need to do it manually.
Manually delete Java through the Control Panel, go to the Java website, download and install the latest version and it should solve the problem.
Let us know if this worked.

Thanks RobS,
i had the same issue and your suggestion was a simple fix.