Add the webupd8team repository
sudo add-apt-repository ppa:webupd8team/java
Get package list
sudo apt-get update
Download and Install the Oracle java 7
sudo apt-get install oracle-java7-installer
Verify the installation
java -version
Or else you can download the JDK from Oracle site. for example " dk-7u71-linux-x64.tar.gz"
Extract it the compressed JDK package
Add JDK bin directory path to the bashrc file, so you can run JDK from any location.
sudo vi $HOME/.bashrc
export JDK_PREFIX=/usr/local/jdk1.7.0_71
export PATH=$PATH:$JDK_PREFIX/bin
No comments:
Post a Comment