1) login as root
2) look for /usr/lib/java (symlink to a directory) and delete it, if it doesn't point to /usr/lib/jdk1.3.1. (Pleas make sure, you have jdk1.3.1 installed).
3) use the following command to create a symlink: ln -s /usr/lib/jdk1.3.1 /usr/lib/java
4) Try it again. If it doesn't work - |