# Step 1: Add the repository for JDK 7. sudo apt-add-repository ppa:webupd8team/java # Step 2: Update sudo apt-get update # Step 3: Install JDK and associated utilities sudo apt-get install oracle-java7-installer # Step 4: Set the default java interpreter used by the system. sudo update-alternatives --config java
References:
- Ubuntu forums: http://ubuntuforums.org/showthread.php?t=1969338
- Ubuntu Community: https://help.ubuntu.com/community/Java
- Oracle (Sun) Java JRE for Ubuntu, Linux Mint and Debian: https://sites.google.com/site/easylinuxtipsproject/java#TOC-How-to-for-Oracle-Sun-Java-JRE
- Ubuntu 12.04 – install sun jdk 6-7: http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7
- Ask Ubuntu: http://askubuntu.com/questions/121654/how-to-set-default-java-version
The command ‘apt-add-repository’ is a link to ‘add-apt-repository’. It will not be available in your machine if the ‘python-software-properties’ package is not installed.
To install ‘python-software-properties’, use the command: sudo apt-get install python-software-properties;
Reference:
– http://askubuntu.com/questions/38021/how-to-add-a-ppa-on-a-server