Cross-platform application launch

Is there any application that creates its own Java application launcher application? Since the term "native" means "it looks like a normal platform-specific application that runs only java -jar foobar.jar and displays an error if the JVM is not installed." I heard about Launch4j, but it only works for Windows. I want a multi-platform solution (Win + Lin + Mac). And I'm not talking about shell scripts; I want a regular executable.

Btw., Eclipse thinks it has something like what I want.

Sincerely.

+6
source share
4 answers

If you use maven, then it would be very simple to create our own application for the entire platform, we use start4j for windows (.exe), for debian (.deb) we use jdeb and for Mac OSX (.app and .dmg) we use osxappbundle .

+3
source

There are tools like launch4j that do this.

You can use it with izPack to provide your own installer and launcher. See this for more details.

+2
source

I use LibGDX Packr , but it uses the JVM that you pack with your application, not the JVM installed on the operating system. Since I prefer to provide real GNU Linux packages, I use JDeb and Redline RPM . I will need to find a solution to create an MSI package for Windows.

These tools are cross-platform, which means you don’t need to be under Mac OS X to create an .app file, you don’t have to be under Windows to create an archived file with a built-in Windows launcher, you don’t have to be under GNU Linux for creating GNU Linux packages.

I use Ant as a build tool, but you can do the same with Maven, JDeb and Redline RPM supports it by writing the Ant task for LibGDX Packr quite easily. I still hesitate to put my deployment tools at a high level in a separate library when I will be able to use JDeb and Redline RPM correctly. I would like to use a homogeneous syntax to allow the developer to use the same parameters to create all their own packages. In addition, my code creates .icns files for you, it is very useful when you do not want to depend on your own Mac OS X tools or on any external applications, this is based on my Apache Commons Imaging patch.

PS: I put my own tool (JNDT) in a separate Ant script a few months ago, its documentation is here .

+2
source

I found install4j useful for multi-platform application binding. It is easy to use and has a nice graphical interface.

It supports Windows + Linux + MacOSX + Unix .
It can also bind a JRE so that you can run it even if the user did not have a JRE installed.

0
source

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


All Articles