Skip to content

Instantly share code, notes, and snippets.

@oleksandr-diudiun
Created December 14, 2015 16:19
Show Gist options
  • Save oleksandr-diudiun/3e4309ac4e7b94d41bb5 to your computer and use it in GitHub Desktop.
Save oleksandr-diudiun/3e4309ac4e7b94d41bb5 to your computer and use it in GitHub Desktop.
Ubuntu Java
# You can use the WebUpd8 Java PPA, so you get updates automatically through the package manager.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo update-java-alternatives -s java-7-oracle
# Are PPA's safe to add to my system and what are some "red flags" to watch out for?
# If you need the latest Oracle Java 6, you install it too:
sudo apt-get install oracle-java6-installer
# If you need the latest Oracle Java 8, you install it too:
sudo apt-get install oracle-java8-installer
# If you want test Oracle Java 9 early access builds, you can install it too:
sudo apt-get install oracle-java9-installer
# To switch between different Java versions, you could use the following terminal command:
sudo update-alternatives --config java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment