Immanuel

Wednesday, February 19, 2014

Install Oracle Java in Ubuntu 13.10

Hello all,

This blog is about installing oracle java in Ubuntu 13.10. Oracle Java is the important run time environment for installing Android Studio and Hadoop end etc.

By default Ubuntu gives open jdk that is good but still i prefer to use oracle java.

Follow the following steps to install

1. Check for java in Ubuntu

dpkg --list | grep -i jdk

2. Add Repository to ubuntu

sudo add-apt-repository ppa:webupd8team/java
 
3. Update list and install oracle JAVA

sudo apt-get update && sudo apt-get install oracle-jdk7-installer

4. Accept the license agreement and enable JDK

update-alternatives --display java
 
5.Check Ubuntu Java Version
java -version
 
If you see this in terminal then all works good
 
java version “1.7.0_25″
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
 
6.Check  Java  Compiler Version
 
javac -version
It should show something like this
javac 1.7.0_25
.
7. Add JAVA_HOME to environment variable

Edit /etc/environment and add JAVA_HOME=/usr/lib/jvm/java-7-oracle to the end of the file
sudo nano /etc/environment
 
8. Append to the end of the file
JAVA_HOME=/usr/lib/jvm/java-7-oracle
 
Happy Hacking:) 
 
  

No comments:

Post a Comment

Twitter Bird Gadget