Mac OS X FAQ (Wiki forum at Coderanch) (original) (raw)

This page collects information about Java development on Mac OS X. Note that some of these resources deal specifically with Apple's now obsolete implementations of Java 6 and older, not the current OpenJDK implementations of Java 7 and 8 (which mostly behaves like the Linux implementation).


Q: How do I compile my first Java program on my Mac?

A: Simplest way is to use a text editor and the Terminal application that comes with your Mac, as described here.


Q: How do I properly set up Tomcat on OS X, with its own user account and everything?

A: Luckily, someone has taken the time to write it all down; get all the details here, and there's also good information at http://wiki.apache.org/tomcat/TomcatOnMacOS.


Q: How do I bundle my Java application so that it looks like a native OS X application?

A: There's a third-party Ant task which makes a jar Mac-friendly, allowing you to provide an icon and other Mac-specific settings.

You can use the hdiutil tool to create a disk image; type man hdiutil on the command line to learn more about it. It can be invoked from an Ant build like this (assuming that MyApplication.app is the application built by Jar Bundler):

JWrapper creates a native OSX app along with other platforms.

If you need a native OS X installer for your Java application, the way to do it is described here.


Q: Can I develop for JME (Java Micro Edition) and/ Android on OS X?

A: The JME SDK 3.0 was available (although without Blu-Ray support, which Macs don't support), but it has apparently been withdrawn. An SDK for JME 8 is not available. See this discussion for some other options. The Android SDK is available for OS X.


Useful Resources


CategoryFaq