Install JDK on Ubuntu

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

#replace 7 with 6 or 8


Switch installed JDK using below commands

sudo update-alternatives --config java

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                     Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-oracle/jre/bin/java   2         auto mode
* 1            /usr/lib/jvm/java-6-oracle/jre/bin/java   2         manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java   1         manual mode

Press enter to keep the current choice[*], or type selection number:


select the number and press Enter

Comments

Popular posts from this blog

Bluetooth Data Transfer Example

DeCompile .apk file on ubuntu 14.04