Steps required to get Java and Tomcat running on Ubuntu
The content of the following steps came from
http://serios.net/content/debian/java/with-java-package.php - I've just condensed them to the steps I followed for Unbuntu (breezy).
- Make sure you have the multiverse repository listed in your
/etc/apt/sources.list
file. If not, add it and run apt-get update
- Install java-package:
apt-get install java-package
this will allow you to convert the .bin file from Sun to a .deb
- Download Java 2 Platform, Sandard Edition, v1.4.2 (J2SE) SDK from http://java.sun.com/j2se/1.4.2/download.html
- Move the downloaded
j2sdk-1_4_2_10-linux-i586.bin
file to a working directory. The java-package step will extract the bin and create a .deb file in this location.
- Run java-package:
fakeroot make-jpkg j2sdk-1_4_2_10-linux-i586.bin
- Install the newly created deb:
dpkg -i sun-j2sdk1.4_1.4.2+10_i386.deb
- Use
update-alternatives --config java
to let Ubuntu use the j2sdk that we installed. This may not be necessary unless you have installed any of the gcj packages.
- set my JAVA_HOME environment variable:
export JAVA_HOME=/usr
- Test that java has been installed:
java -version