Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Commands to install Oracle Java on Ubuntu
sudo apt-get install galternatives
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
(then use Gnome galternatives GUI to set the default)
OR on the pure command line:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
sudo alternatives --install /usr/bin/java java /opt/jdk1.6.0_26/bin/java 1500
sudo alternatives --install /usr/lib/jvm/jre jre /opt/jdk1.6.0_26 1500
sudo alternatives --set java /opt/jdk1.6.0_26/bin/java
sudo alternatives --set jre /opt/jdk1.6.0_26
@djangofan
Copy link
Author

djangofan commented Dec 22, 2011

Linux Mint 12 and XUbuntu already come pre-installed with Sun/Oracle JDK while Ubuntu comes with OpenJDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment