You probably need to set your $PATH variable to reflect the locations of your java bin's. I am running Gentoo on an iBook and had the same deal. For example, (I am not near the iBook right now), on my desktop my path is:
scruff@genbox scruff $ echo $PATH
/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/usr/X11R6/bin:
/opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin:
/usr/qt/3/bin:/usr/kde/3.2/bin
There are different locations your path might be set, but generally it goes like this: for a global setting /etc/profile, for user defined settings, ~/bashrc or ~/bashprofile. Take a look at these files and you should see something like "export PATH="/insert/path/locations/here"
Alter them to suit your java locations
Also, check your window manager (KDE, Fluxbox, etc) settings to be sure the MIME types are set correctly.