0

I'm having some trouble getting IntelliJ to output my packaged JAR file so I can run it directly from the command line.

Are there any free stand alone packagers which I can use to manually add all my JARs and specify my main class which will properly package the JAR? I'm really only interested in a packager, not an installer with fancy windows etc.

I'm using Ubuntu and developing JavaFX applications.

I did find these and these links... I'll give Install Builder and lzPack a go and hopefully report back with a positive result.

UPDATE

Install Builder seems to require a paid license to distribute your packaged jars. Unfortunately izPack does not seem to work when I execute it from the command line using Java 9. Crashes out.

Trying Oracle's javapackager command tool next.

Looks like I need to use Ant to deploy standalone JavaFX applications.

  • 1
    If you want to start by `java -jar prog.jar` any zip utility will make the job as long you stay with the standard JAR layout and Manifest to give the main class. https://en.wikipedia.org/wiki/JAR_(file_format) – PeterMmm May 06 '18 at 09:26
  • @PeterMmm thank you I didn't know this. I have found the Oracle docs on the standard JAR format here so will take a look at that also: https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html –  May 06 '18 at 09:30
  • This also seems very thorough: https://stackoverflow.com/questions/30145772/what-is-the-best-way-to-deploy-javafx-application-create-jar-and-self-contained –  May 06 '18 at 09:33
  • command line: "jar --help" is useful, as is "javapackager --help" – Phil Freihofner May 11 '18 at 11:09
  • If you are going to tackle learning Ant from square one, this tutorial is a good place to start. http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html But it could well be that javapackager combined with jlink and knowledge of jar will be sufficient. I'm still learning this stuff myself. – Phil Freihofner May 11 '18 at 11:13

0 Answers0