bundler

Java: How to handle drop events to your Mac OS X Dock icon (Part 2)

In Part 1 of this tutorial I shared the Java source code you need to handle drag and drop events on Mac OS X. But as I mentioned in that tutorial, the recipe to handle files that are dropped onto your Dock application icon requires a little more work, in particular an Ant build process that uses the JarBundler task. So here in Part 2 of this tutorial, I'm sharing my Ant build script that completes this recipe.

Sample Mac Jar Bundler Ant build script

I was going to write a little tutorial on how to use the Jar Bundler Ant task for Mac OS X, but I don't have the time to do that right now.

So, I'll just share my Mac OS X Java Ant build script, which includes the JarBundler task. You should be able to use this Ant build script to build a Java application so it appears to the user to be a native Mac OS X application, even though it's really a Java application under the covers.

Mac Java application - how to bundle a Java application on Mac OS X

I just posted a new tutorial titled How to bundle a Mac Java application on Mac OS X using Xcode's Jar Bundler. This tutorial demonstrates how to use the Mac OS X Jar Bundler utility to configure a Java application to install like a native Mac application, and look right in the Finder, the Dock, and the Get Info window. It also starts to look at using an Ant task to automate the bundling process.