packr icon indicating copy to clipboard operation
packr copied to clipboard

Installed JRE is used instead of bundled JRE

Open jdonkers opened this issue 4 years ago • 1 comments

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:

  • users who were receiving a blank screen when executing the game were able to fix this by updating their local Java version
  • I can reproduce the error user are seeing by executing the JAR with their version of java.

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

jdonkers avatar Jul 11 '21 22:07 jdonkers

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?

petoncle avatar Oct 08 '21 09:10 petoncle