If you like this video, please share with other Java developers who may be looking for an easy way to package jar files.

This is an update video to my previous tutorial, because I released an update to JarBundler that changes the way setup works.

This is the easiest method to package your Java Swing apps into an actual .app file that can show up on your dock and on Launchpad. The neat thing about this is that the final result works on the latest operating systems as of this recording (OS X 10.10 or AKA Yosemite), and I have not found any other working GUI programs that does this. Apple supplied one a while back, but since then they've dropped support for Java, and now that doesn't work.

Before you can use my JarBundler app, you need to set up a few things. In this tutorial I show you how to set it up.

Apache Ant: http://ant.apache.org/bindownload.cgi
JarBundler: https://github.com/tenny1028/JarBundler/releases/tag/v2.3
appbundler-1.0.jar: https://java.net/projects/appbundler/downloads

After downloading Apache Ant and appbundler-1.0.jar, you need to unzip the Ant download, and move it anywhere you want. In this video, I move it to my home folder. It's ok if you just drag it with Finder, but I used Terminal:

cd ~/Downloads
mv ant ~/ant

Also, I had to move appbundler-1.0.jar somewhere, and since I had no other use for the jar file, I just decided to move it to ~/ant/lib/.

mv appbundler-1.0.jar ~/ant/lib/appbundler-1.0.jar

But of course you can move it to wherever  you want, and if you already have it installed, you should be able to find it, unless Ant is in a hidden folder.

If your Java program uses several external jar libraries you can view my other video about how to package external libraries into a single jar file here: http://youtu.be/Y_X7ffpIt3Y

Here are ten tips and tricks for using IntelliJ: https://www.youtube.com/watch?v=Mr2mPu1tLhk

If you wish to upload your app to the Mac App Store, it's a little bit more involved. You will have to follow this tutorial to sign your app: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html 


Leave a Reply