sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Nice thing is that it keeps java version up-to-date. There is longer explanation with different alternatives in Ubuntu site.
Optional: add to .bashrc
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
No comments:
Post a Comment