Installation of Java on Debian 6

Solution 1:

On Debian and Debian-based systems usually /usr/bin/java is just a symlink to /etc/alternatives/java. The reason for this design is that many versions of the same software can coexist together (in your case Java 1.5 and 1.6).

Run:

sudo update-alternatives --config java

to choose default Java version.

For further information on updates-alternatives see:

http://www.debian-administration.org/articles/91