Manually installing JDK to ubuntu
sudo apt-get install fakeroot
sudo apt-get install java-packages
chmod +x {downloaded_file_name}.bin
fakeroot make-jpkg {downloaded_file_name}.bin
sudo dpkg -i {file_created_from above}.deb
sudo update-alternatives --config java
check the version:
java -version
#upgrading
- install the newer version
- remove the directory which the older version is stored
- use update-alternatives to change the version to be used