After installing Java 1.5 on OS X with one has to activate it. This can be done by doing the following tasks:
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm Current
sudo rm CurrentJDK
sudo ln -s 1.5 Current
sudo ln -s 1.5 CurrentJDK