[java] Convert .jar to an OSX executable?



1 Answers

JarBundler is obsolete, but there is a (better) official replacement: the javapackager tool.

For OSX, A simple, well explained, step by step tutorial on how to create a DMG from java is here: http://centerkey.com/mac/java/ . For other platforms, you just need to modify the example by using the proper switches in javapackager.

Question

I made a Java application which I would like to distribute on Windows, OSX and Linux without distributing a jar file. I used the great Windows exe wrapper http://launch4j.sourceforge.net/ to create an .exe file complete with my icon that won't scare Windows users.

Are there similar wrappers that I can use for OSX/Unix? An important consideration is that I would like to have my own icon on the executable (especially for mac users).

Thanks!




You can also package your application with the JarBundler Ant task:

http://informagen.com/JarBundler

<jarbundler dir="release"
        name="MyApp"
        mainclass="org.foo.myapp.Main" 
        jar="myapp.jar" />





Related



Tags

java java