Java Reference
In-Depth Information
A PPENDIX C: S ETTING U P E XAMPLES FOR M ACINTOSH OSX
• Installing Java
• Installing Apache Ant
• Compiling Examples
• Using Eclipse
The examples in this topic require JDK 5.0 or higher. As of the writing of this topic JDK
6.0 had not been released for the Macintosh. However, if JDK 6.0 is available, you should use
it. This appendix shows you how to download and install all of the software necessary to use
these examples. This includes installing Java, installing Apache Ant, as well as how to use
these examples with an IDE such as Eclipse.
Installing Java
Macintosh computers obtain the latest version of Java directly from Apple. Apple has al-
ready released a version of Java that is compatible with the examples in this topic. If you have
kept up to date with your operating system updates, you likely already have the latest version.
You can also obtain Java from Apple's Java page at:
http://www.apple.com/macosx/features/java/
To determine if you have the correct version of Java, you can open a terminal window,
and issue the following command:
java -version
You should see a version of 1.5 or higher. If you do not have the correct version, visit the
above URL and obtain the latest version of Java. Figure C.1 shows a terminal window with the
correct version of Java.
 
Search WWH ::




Custom Search