1

i have downloaded oracle javaSE from oracle website.

File Name :jdk-8u45-linux-x64.tar

had used command :

tar -zxf jdk-8u5-linux-x64.tar.gz -C /usr/lib/jvm

for extraction.

after this what procedure i should follow to install it.

2 Answers2

3

mkdir if not present "/usr/lib/jvm" download package and type this comand from the download directory

tar -zxf jdk-8u5-linux-x64.tar.gz -C /usr/lib/jvm/jdk1.8.0_45

install java

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_45/bin/java 100

to check if java is installed type

java -version

if you have multiple java you need to configure it by

sudo update-alternatives --config java

enter the number you want the default java to be from the list

tyson
  • 31
0

The easiest way to install Oracle java to Ubuntu is this. Run

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

You will get latest java 8.

Pilot6
  • 92,041