up previous next contents
Up: java-on-mac Previous: Fixing the problems with Next: Mac OS X Jar   Contents

Jar Bundler as an Ant task

Now that you've seen that the Jar Bundler really just creates a directory structure and one really important text file for you, you may be thinking "Hey, I can automate this process with Ant."

The good news is that other people have already been down this road, and have done some of the hard work for you. Here's a URL I found for a Jar Bundler Ant task:

  1. informagen.com/JarBundler/

(This JarBundler Ant task is based on earlier work at loomcom.com.)

I have now used this Mac OS X Ant Jarbundler task on several "Mac Java" applications, and I'm glad to share my Java/Ant/Mac build scripts. Here are several links to my "Java on Mac OS X" Ant/Jarbundler build scripts:

I actually have several other Java/Mac/Ant/Jarbundler resources, but as of May, 2010, those are the most up to date resources I have to share. The first link in particular includes the source code for an entire Mac Java project, where the end result of the project is a native Mac OS X application. The Jarbundler Ant task does the hard work of bundling the Java application so that for all intents and purposes, the user doesn't need to know what language the application was written in, as all they see is a Mac application icon they can double-click and run.

Creating a Mac ICNS icon file from a PNG, JPG, GIF image file

In a related note, somewhere along the way you're going to need to be able to create a Mac ICNS icon file to make your Java application look like a native Mac OS X application, so here's a link to my Mac ICNS icon file tutorial, which shows how to create an ICNS file from a JPG, PNG, GIF, or other image, all for free.