« Subversive thoughts on Subversion | Main | The Horror of Oracle's OCI driver »

May 02, 2005

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.

Posted by gluck at May 2, 2005 02:53 AM

Comments

 
Buy tadalafil swallow that pill erectile dysfunction forums It`s no secret that buy viagra no script. What Is Viagra Used For are you looking for mail order viagra online looking to control your erection? how to buy viagra. Discount viagra buy viagra no rx.