i had the same problem when i tried to use it. i found out that you have to install Sun's java runtime environment to get it to work.
here is how you do it.
First you will need to add all the extra repositories for Ubuntu. (ie Multiverse, Universe...) Please see other how to's on how to do that.
Now go to Sun's website
http://java.sun.com/ and select the java jdk or jre that you want.
This example uses J2jsdk-1.4.2 but you can use any J2sdk. Run similar commands from the terminal:
First install the required packages:
sudo apt-get install fakeroot java-package java-common
Create the Deb file for the install:
fakeroot make-jpkg sun-j2sdk-1.4.2_10-linux-i586.bin
Install The deb file
sudo dpkg -i sun-j2sdk-1.4.2_10_i386.deb
Now make Sun's java the default by running this command and selecting it.
sudo update-alternatives --config java
you can now check your java sdk with:
java -version
java version "1.4.2_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)