-
Notifications
You must be signed in to change notification settings - Fork 41
Description
I haven't seen any other discussion regarding Windows/Java troubleshooting so I'm submitting this issue with a workaround for anyone with the same problem.
Environment:
Windows 10 with a current OpenJDK (JRE only) x64 install:
The only Java-related environmental variable is in system PATH: "C:\Program Files\Eclipse Adoptium\jre-21.0.7.6-hotspot\bin"
(Note: This entire issue is reproducible with a current Oracle JRE as well.)
Problem:
The exe from the Windows packages (installer/portable) won't launch, giving an error "Failed to launch JVM".
Solution:
Using the portable Windows install as a base,
Run a .bat file targeting NearInfinity.jar in "NearInfinity\app" with the following contents:
@echo off
set path=C:\Program Files\Eclipse Adoptium\jre-21.0.7.6-hotspot\bin\
java -version
javaw -jar NearInfinity.jar
pause
exit
The "set path" is the important part... It seems the Java executables aren't being found by Windows, which I assume was determined in system environmental variables. I'm only using a PATH variable as noted above, not JAVA_HOME or _JAVA_CONFIG, etc.
System Information:
