1

I have a question about javapackager, I'm newbie of this feature.

I need to create an exe (and app for OSX) to be distributed. I used javapackager to create a bundle with JRE included and I create my setup, all seems to work. The problem is that if I use from Java (ProcessBuilder) the command:

$java -jar foo.jar

The OS give me a JRE missing error (if Java is not installed on PC).

All I want is to set the JAVA_HOME variable to my bundled JRE from javapackager or a solution that doesn't involve the change of the command line.

I tried Launch4J and all works as I expected (it set the temporary PATH and JAVA_HOME variable), so I think this is possible but I don't know what are the parameters involved. I prefer to use javapackager because it's less OS dependent.

I tried to set from -Bruntime but this is not the solution.

Thanks for the help and for ideas to workaround.

emish89
  • 696
  • 8
  • 25
  • It should be enough to point to main-class in the build file and to *not* strip commands from the bundle. – Cromax Nov 10 '18 at 18:46

0 Answers0