random technical thoughts from the Nominet technical team

Build Java Apps for Mac OS X

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by chris on Feb 9th, 2006

I was looking to package a Java Swing Application as a proper Mac OS X application. I found some instructions on how to do it here (look towards the bottom of the page):


http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/

One slight issue is the fact that inside the Mac .app file is a special JavaApplicationStub which fires off the whole process. This must have its executable flag set or the thing will not fly. Ant does its best to mess everything up here as its copy command will not respect UNIX file permissions. Another possible problem is that if you build the .app on Windows the permissions will also be lost. The solution: use the tar task to build a tar.gz of the .app directly. You can then specify that the stub file should have mode 755. When it is expanded on a Mac it will have the right permissions regardless of what platform it was built on.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: