Skip to content

Instantly share code, notes, and snippets.

@narutaro
Last active April 13, 2016 23:32
Show Gist options
  • Save narutaro/71f7c474898f0cb12119 to your computer and use it in GitHub Desktop.
Save narutaro/71f7c474898f0cb12119 to your computer and use it in GitHub Desktop.
Oracle JAVA 7 istallation

#Install

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

If you see this error,

$ sudo add-apt-repository ppa:webupd8team/java
sudo: add-apt-repository: command not found

Run this.

$ sudo apt-get install software-properties-common

#Version

java -version
# => java version "1.7.0_65"
# => Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
# => Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

#Setup

echo export JAVA_HOME=/usr/lib/jvm/java-7-oracle >> ~/.bash_profile
. ~/.bash_profile

env | grep JAVA_HOME
# => JAVA_HOME=/usr/lib/jvm/java-7-oracle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment