HOWTO: Java 5 on Mac OS X 10.4 Tiger

Mac OS X 10.4 aka Tiger does not come with Java 5. However Java 5 was released as a download the day OS X 10.4 was released: 29 April 2005. This post is about getting and using Java 5 on Mac OS X 10.4.

Getting It

You can download Java 5 for Mac OS X 10.4 here.

Configuration

After installation Java 1.4.2 remains the default. You can change the default for Applications and Applets to Java 5 through the new utility:

/Applications/Utilities/Java/J2SE 5.0/Java Preferences

With these changes command line invocation remains at Java 1.4.2. I changed this by making some changes to my shell profile. I use bash, so I changed my .bash_profile in my home directory as follows:

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
export ANT_HOME=~/apache-ant-1.6.2
export PATH=PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH

To get the new profile to take immediate effect, I typed

. .bash_profile

.

IntelliJ Idea on Java 5

IntelliJ Idea 4.5 requires Java 1.4.2. Changing the application default to Java 5 (using the new Java 5 preferences utility discussed above) breaks Idea.

Fortunately, the latest Idea 5.0 beta now supports Java 1.4.2 and Java 5. Get it from http://intellij.net/eap (free registration required).

Performance

To test performance, I used JPam, an open source Java-PAM bridge I have been working on lately. The default Ant target uses javac, javah, jar, gcc, javadoc and runs many jUnit tests, some of which are concurrency tests using 50 threads.

I ran three tests using each JDK and got similar minimum, maximum and mean run times. In this test at least, there was no significant differences to report.

More Information

Here is a list of useful Apple resources for Java 5:

  1. Mailing List Archive – java-dev
  2. Java Development Guide
  3. Java Release Notes

Conclusion

I am happy to have Java 5 on Mac OS X. It seems to be solid and ready for use. Now that it is here it will simplify the lives of tool makers who were holding of supporting Java 5.

Published
Categorized as Java

By Greg Luck

As Terracotta’s CTO, Greg (@gregrluck) is entrusted with understanding market and technology forces and the business drivers that impact Terracotta’s product innovation and customer success. He helps shape company and technology strategy and designs many of the features in Terracotta’s products. Greg came to Terracotta on the acquisition of the popular caching project Ehcache which he founded in 2003. Prior to joining Terracotta, Greg served as Chief Architect at Australian online travel giant Wotif.com. He also served as a lead consultant for ThoughtWorks on accounts in the United States and Australia, was CIO at Virgin Blue, Tempo Services, Stamford Hotels and Resorts and Australian Resorts and spent seven years as a Chartered Accountant in KPMG’s small business and insolvency divisions. He is a regular speaker at conferences and contributor of articles to the technical press.