Howto Install Sun Java on Debian Etch

This small guide shows how to install the original Sun Java 2 Platform Standard Edition 5.0 JRE (Java Runtime Environment) and JDK (Java Developer Kit) on Debian 4.0 Etch

The original Sun Java 2 is available in the ‘non-free’ section of the Debianrepositories. To enable this section first add the non-free repository to the apt sources file – the /etc/apt/sources.list should look like, – important parts are in bold:

deb etch main contrib non-free

Now, update apt:
sudo apt-get update

Then install the Java debian packages.
sudo apt-get install sun-java5-jre

Or this for installing the JDK ( the Java SDK )
sudo apt-get install sun-java5-jdk