Skip to content

Instantly share code, notes, and snippets.

@djangofan
Created December 8, 2011 05:28
Show Gist options
  • Save djangofan/1446205 to your computer and use it in GitHub Desktop.
Save djangofan/1446205 to your computer and use it in GitHub Desktop.
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

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