|
|
||||
|
||||
|
|
||||
|
||||
|
|
|
|
||||
|
||||
|
|
||||
|
||||
|
|
Mac OS X FAQ | |
|
This page collects information about Java development on the Apple Macintosh.
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: Why are Apple's Java releases continuously behind Sun's?
A: For most people this is not the big deal it's being made out to be, annoying though it may be. See here for some discussion.
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 bundle my Java application so that it looks like a native OS X application? A: Apple provides a tool called Jar Bundler for this purpose, which is part of the Xcode Development Tools. It can bundle any number of jar files inside a Cocoa launcher, helps provide a proper icon and application menu title, and more.
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):
There's also a third-party Ant task which does something similar. 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/or Android on OS X?
A: The JME SDK 3.0 is available from Sun (although without Blu-Ray support, which Macs don't support). Also see this discussion for some other options. The Android SDK is also available for OS X.
Q: Is it possible to customize the Swing Aqua L&F?
A: Yes, a few options have been written up here.
Q: My applet was compiled with Java 6, but it doesn't run on the Mac; what gives?
A: Not all versions of OS X support all versions of Java. For example, OS X 10.4 does not support Java 6. All the details can be found in Apple's Technical Note 2110.
Useful Resources
CategoryFaq | |