Wrap the application to create sh file in Ubuntu Linux Wrap the application to create sh file in Ubuntu Linux shell shell

Wrap the application to create sh file in Ubuntu Linux


If you're using maven to build your application there is a plugin called appassembler-maven-plugin that can create a .sh file for your application.

The groupId is org.codehaus.mojo.


You need to generate an executable jar, then you can simply run "java -jar main.jar" from there.

There are many questions on stackoverflow on how to create executable jars (you need ot set stuff in the MANIFEST.MF file in the jar file), for instance:

How do I create executable Java program?