Question

Is there any application that creates an native application launcher of Java application? As the "native" term I mean "looks like normal, platform-dependent application, that only launches the java -jar foobar.jar, and displays the error if there're no JVM installed". I heard about Launch4j, but it only works for Windows. I want multi-platform (Win+Lin+Mac) solution. And I'm not talking about shell scripts; I want normal executable file.

Btw., Eclipse looks that it has got something like that I want.

Regards.

Was it helpful?

Solution

If you are using maven, then it would be very easy to create Native application for all platform, we use launch4j for windows(.exe), for debian(.deb) we use jdeb and for Mac OSX(.app and .dmg) we use osxappbundle.

OTHER TIPS

There are tools like launch4j that do this.

You can use it together with izPack in order to provide a native installer and launcher. See this for extra details.

I use LibGDX Packr but it uses the JVM that you package with your application instead of the JVM installed on the operating system. As I prefer providing real GNU Linux packages, I use JDeb and Redline RPM. I will have to find a solution to create a MSI package for Windows.

Those tools are cross-platform, it means that you don't have to be under Mac OS X to create an .app file, you don't have to be under Windows to create a zipped file with a native Windows launcher, you don't have to be under GNU Linux to create GNU Linux packages.

I use Ant as a build tool but you can do the same with Maven, both JDeb and Redline RPM support it, writing an Ant task for LibGDX Packr is quite easy. I still hesitate to put my high level deployment tools into a separate library when I succeed in using JDeb and Redline RPM correctly. I'd like to use an homogeneous syntax in order to allow a developer to use the same parameters to create all native packages. Moreover, my code creates the .icns files for you, it is very helpful when you don't want to depend on native Mac OS X tools or any external applications, it's based on my patch of Apache Commons Imaging.

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

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top