I\'ve got to write some code for a legacy application that is still running JDK 1.5. Unfortunately, it looks like OS X doesn\'t actually have a 1.5 JDK installed; it ju
Have a look at http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard on how to get and install 1.4 and 1.5 JDKs on Snow Leopard. Also bear in mind that whenever you run Software Update and a JDK update is installed, you will need to "fix" the symlinks to the 1.4 and 1.5 JDKs.
UPDATE: as a side note, for those developing with several JDKs on OS X, have a look at this handy little utility to switch JDK from the command line: setjdk.
You don't need a copy of Java 1.5 in order to develop for it; Java 1.6 is backwards-compatible with Java 1.5, so anything that would work on 1.5 will work on 1.6. The -source
and -target
flags may be of use in order to ensure that everything works on 1.5. That said, this article will explain how to get a copy of Java 1.5 on Snow Leopard. Be aware, though, that it could potentially trash/harm your system.