Obviously you need to remove the leading period.
Just use /usr/local/java/jdk1.5.0_01/bin/java
The installation package for the JDK does not only extract the files, but also sets up some user settings like the path variable, JAVA_HOME and a nomber of other settings.
I am not sure wheter the Java package or the Mozilla package set up the link for the Java plugins, so that might need checking.
Just extracting the JDK does not do the job. Although it will be functional, it needs to be 'registered' in the OS.