

To setup everything else (like browser plugin, keytool, etc.) you can use this (it will be a long list!): sudo update-alternatives -all Remember to select the right version: sudo update-alternatives -config java You can see all available packages in /var/local/oab/deb
DOWNLOAD JAVA FOR UBUNTU INSTALL
Sudo apt-get install sun-java6-jdk sun-java6-fonts sun-java6-source
DOWNLOAD JAVA FOR UBUNTU UPDATE
Script will build packages from source and place them in local repo, then they can be installed e.g.: sudo apt-get update Make sure git is installed: sudo apt-get install git I've used this excellent automatic script. There you can find all recommended methods. There is very good page on official Ubuntu wiki. Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode) Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Press enter to keep the current choice, or type selection number: 2 * 2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1 manual mode You should get the following Selection Path Priority StatusĠ /usr/lib/jvm/java-7-oracle/bin/java 1 auto modeġ /usr/lib/jvm/java-7-oracle/bin/java 1 manual mode

You may want to also add the following sudo update-alternatives -config java Thanks to the comments, please note that you can try this method too: Make the sun java the default Ubuntu 12.04 (Precise Pangolin) - another way Sudo add-apt-repository ppa:webupd8team/java If you want the JRE and the browser plugin: sudo apt-get install python-software-properties Sudo apt-get install oracle-java7-installer Sudo add-apt-repository ppa:eugenesan/java

Sudo apt-get install sun-java6-jdk sun-java6-pluginĬlean up the historical open jdk: sudo apt-get purge openjdk*Īdd a new repo and install the sdk: sudo apt-get install python-software-properties Sudo add-apt-repository ppa:ferramroberto/java Ubuntu 11.10 Oneric sudo apt-get install python-software-properties Alternatively, one can install Oracle JDK 17 on Ubuntu using the Linux Uprising team PPA installer script which automatically downloads and sets the default Java version on Ubuntu 64-bit based systems. You're advised to read through the comments first. For this option, we download the production-ready Java from the Java SE Downloads page. NOTE: Some of the contents of this answer might have become obsolete and there are some comments where people have reported problems.
