JAVA_HOME needs to point to a directory where you installed Java JDK or JRE, not to the "java" program.
So, $JAVA_HOME/bin/java is the location of the java program.
In other words, do:
Code:
export JAVA_HOME=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/
if you only installed the jre.
Or
Code:
export JAVA_HOME=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/
if you have the full JDK.
Also, run
to get a list of options for "java" and see if there's a "-jar" option.
And finally, as "which java" indicates, the /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java isn't used, but
/usr/bin/java instead.
Can you do an "ls -l /usr/bin/java " to see if it's a symbolic link to another program?