Ted Wise header image 2

Using Java 1.5 and Java 1.4 on Snow Leopard 

Copy ShortURL

September 25th, 2009 · View Comments · Java, Mac

Since Apple removed Java 1.5 and Java 1.4 from Snow Leopard, it's not possible to run software that requires older Java versions, or to develop against older Java versions.

In order to restore Java 1.4 and 1.5 to your Snow Leopard install, you'll need to download the old Leopard versions and put them back where they belong in Snow Leopard. This will only work for Intel Macs.

You'll need to use the Terminal in order to install one or both of the older Java versions. To get started, open up the Terminal and type the commands as shown. You don't need to install both versions. The instructions for each are independent.

To install Java 1.5
First get the Java 1.5 archive and expand it.

cd /tmp/
wget http://tedwise.com/files/java.1.5.0-leopard.tar.gz
tar -zxvf java.1.5.0-leopard.tar.gz

Then move it to the standard OS/X Java location.

sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard

And finally, setup all of the links required for OS/X.

cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm 1.5.0
sudo ln -s 1.5.0-leopard 1.5.0
sudo ln -s 1.5.0-leopard 1.5

To install Java 1.4
Get the Java 1.4 archive and expand it.

cd /tmp/
wget http://tedwise.com/files/java.1.4.2-leopard.tar.gz
tar -zxvf java.1.4.2-leopard.tar.gz

Then move it to the standard OS/X Java location.

sudo mv 1.4.2 /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2-leopard

And setup all of the links required for OS/X.

cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo ln -s 1.4.2-leopard 1.4.2
sudo ln -s 1.4.2-leopard 1.4

After installation
After you've installed one or both of the Java versions you can change the default Java used by OS/X. This step isn't necessary unless you need to force OS/X to use one of the versions you've just installed.

If you do want to change the default Java version used by OS/X, open up the Java Preferences utility located in /Applications/Utilities.

Java Preferences

You can drag and drop Java versions in the bottom pane to change the order in which they are used. The top version is the default version used by OS/X. Make your change in the bottom pane - this is the JRE used when launching Java applications. The top pane selects the JRE used for browser applets.


1. These instructions are copied almost verbatim from OneSwarm.  I only added a few steps and self-hosted the Java downloads.

2. Instructions for an alternative approach are provided by Chris Snyder. This only works for Java 1.5, but it obtains the Java binaries directly from Apple.

Share and Enjoy:
  • email
  • Twitter
  • Facebook
  • Slashdot
  • LinkedIn
  • Digg
  • DZone
  • Reddit

You might also enjoy

  1. Easy Guide to 64-bit Eclipse on the Mac
  2. Compiling Ruby with MacRuby 0.5b1
  3. Putting things in perspective
  4. Grand Central Dispatch
  • Ranga
    Nice article!
    I have installed JDK 1.4 on Snow Leapord, but am unable to run my ant scripts. Get the following error:
    Please Attach Debugger : No Autorelease pool exists
    Press any key to continue...

    Any thoughts on how this can be fixed?

    Thanks.
  • Sorry, I don't know what the cause or resolution of the error is. Please post back here if you find it.
  • tony
    I'm getting the same error, any idea how to resolve?
  • aravindk
    I am also getting this error, please help.
  • firas
    god effort , thank you very much
  • William
    Very handy. This has given me back my stability with Intellij 8/9 after the Snow Leopard Upgrade.

    Thanks!
  • Robert
    So useful! Thank you!
blog comments powered by Disqus