Java system variables need to be set I had the same problem (Redhat 7.3). You need to set a system enviorment variable and add it to your profile file.
Step 1: Find out the file location for java. Mine is:
/usr/java/j2re1.4.1_01
Step 2: You need to add some lines to your login profile file located at /etc/profile
Open the profile file with a text editor and add the following lines (add it as the first few lines of the file):
JAVA_HOME=/usr/java/j2re1.4.1_01
PATH=$PATH:$JAVA_HOME/bin
Step 3: Restart your computer, open up a shell console, and type in java. You should get a listing of availible commands for java.
This should solve your problem.
P.S.
Also, FYI, if you install Java Web Start you need to do this same thing. Add the following text to the profile file:
JAVAWS_HOME=/usr/java/j2re1.4.1_01/javaws
PATH=$PATH:$JAVAWS_HOME |