1. Install the 6.0 version of jdk, use the following command:
sudo aptitude install sun-java6-jdk
2. Set the default java:
sudo update-alternatives --config java
sudo update-alternatives --config javac
3. In the /etc/environment file Environment variable settings:
CLASSPATH=/usr/lib/jvm/java-6-sun-1.6.0.00/lib/
JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00/
sudo aptitude install sun-java6-jdk
2. Set the default java:
sudo update-alternatives --config java
sudo update-alternatives --config javac
3. In the /etc/environment file Environment variable settings:
CLASSPATH=/usr/lib/jvm/java-6-sun-1.6.0.00/lib/
JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00/