Installing
-
Download Oracle Java SE JDK 6 for Linux
-
Unpack the jdk6.bin Archive
sudo su
Authenticate with the User Admin Pass.
If Got “User is Not in Sudoers file” then see: How to Enable sudocd && cd Downloads
./jdk1.6*.bin
-
Relocate JDK 6
mv ./jdk1.6.* /usr/lib/jvm/jdk1.6
And if Not jvm Dir then first do:
mkdir /usr/lib/jvm
-
Installing Oracle Java JDK6.
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.*/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.*/bin/javac 1065
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.*/bin/jar 1065
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.*/bin/javaws 1065
Checking or Setting the System Java Version in Use with
update-alternatives --config java
And for the Java Compiler instead:
sudo update-alternatives --config javac
To Switch of Java Version Just Enter the Reference Number on First, Column. :)
Contents