Packaging java applications

I have a java application from which I create a jar that relies on many third-party banks, what is the best / common way to package this application to distribute the end user?

+4
source share
3 answers

The best way is to use a build tool like Maven2 or something similar, and use it to manage your dependencies and all-in-one package.

Otherwise, you are mostly stuck with manifest files. Although, IDEs like Eclipse or NetBeans may help you a bit.

+3
source

Packing method. There are two ways:

  • wrap as an executable: This is common if you know the supported platform and end the Jar in the executable. And distribute it. Something like this http://launch4j.sourceforge.net/ (I have not used this, but there is a similar shell)

  • Join all the Jar and provide a script:. You can use the Maven Assembly plugin to merge just one Jar . In doing so, you can distribute bat and .sh files for systems based on Windows and Linux, respectively. If you see that Glassfish is distributed in a similar way. These scripts have an executable command and often take parameters for different types of behavior.

+3
source

Source: https://habr.com/ru/post/1334968/


All Articles