libgdx / packr

Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X
Apache License 2.0
2.56k stars 171 forks source link

Installed JRE is used instead of bundled JRE #207

Open jdonkers opened 3 years ago

jdonkers commented 3 years ago

I'm developing a game and using packr to bundle it (it is a very useful tool so first of all thank you!).

The issue I am having is regarding windows-64 users who already have Java installed. When they execute the packr bundled .exe their local Java is used instead to run the JAR instead of the bundled JRE as expected.

I know this is happening because:

Any help would be appreciated, thank you.

Here are my settings:

java -jar packr-all.jar --platform windows64 --jdk "[JDK PATH]" --useZgcIfSupportedOs --executable [NAME] --classpath [NAME].jar --mainclass [NAME].Main --output out-windows

petoncle commented 3 years ago

Is your jar file a runnable jar, does it contain a manifest file with a Main-Class entry? Are you sure the users are running the .exe file and not the .jar file?