Posts Tagged application bundle
OSX-bundle for Java applications
If you want to distribute a Java application on OS X, you have to create an application bundle. There are a very nice project (JarBundler) which provides a feature-rich Ant-task which will create an a OS X application bundle from a list of jar files.
As described on the project homepage of the JarBundler, the release of Java7 has changed a lot. E.g. Java7 is installed in a different place as the previous JRE provided by Apple and the structure of the ‘Info.plist’ has changed. The Jarbundler will not work with Java7! Unfortunately there is no plans to do this.
There is another Ant-Task AppBundler, which does the work but not as feature-rich as the JarBundler.
I was confronted with the task to create an OSX-bundle for an existing Java application and was looking for an extensive example but didn’t found any one. There are several problems with the AppBundler, e.g. the working directory and the home directory are identical. (Many existing applications expected their resources inside their working directory.)
My project OSX-Java-Launcher-Demo shows how to handle the AppBundler. Thereby following priorities were set:
- the working directory of the application and the resource directory of the OSX-bundle are identical
- 3rd-party-libraries are respected