Is there a way on Windows to run a JAR file using a JRE located in a specific folder? Similar to the way Eclipse looks for its JRE in some path you give to it. Either some windows executable code (C or C++) or a Batch file will do the job. Thanks!
解决方案
A JRE directory has a bin/java.exe.
You can run a jar from that JRE simply with
/bin/java.exe -jar Executable.jar
If you don't want to have to open a console each time, simply put the above line in a .bat file and double click on that.