Today, from this post , I will try to show you, how we can install java 8 in Ubuntu 16.04 / 17.10 / 18.04 environment. So lets start...
For doing this you need to follow some steps these are as below:-
Step 1: Add PPA[ Personal Package Archives] :- The easiest way to install Oracle Java JDK 8 on Ubuntu is via a third party PPA… To add that PPA, run the commands below
If everything is Ok as per given screen shot then you can proceed for next steps.
Step 2: Now that the PPA repository has been added to Ubuntu, run the commands below to download Oracle Java 9 installer…. the installer should install the latest Java JDK 9 on your Ubuntu machines.
For doing this you need to follow some steps these are as below:-
Step 1: Add PPA[ Personal Package Archives] :- The easiest way to install Oracle Java JDK 8 on Ubuntu is via a third party PPA… To add that PPA, run the commands below
sudo add-apt-repository ppa:webupd8team/javaAfter running the commands above, you should see a prompt to accept the PPA key onto Ubuntu… accept and continue.
If everything is Ok as per given screen shot then you can proceed for next steps.
Step 2: Now that the PPA repository has been added to Ubuntu, run the commands below to download Oracle Java 9 installer…. the installer should install the latest Java JDK 9 on your Ubuntu machines.
sudo apt update
sudo apt install oracle-java8-installer
When you run the commands above you’ll be prompted to access the license terms of the software… accept and continue.
Step 3: Set Oracle JDK8 as default, to do that, install the oracle-java8-set-default package. This will automatically set the JAVA env variable.sudo apt install oracle-java8-set-default
The command above will automatically set Java 9 as the default… and that should complete your installation, you can check you java version by running following command.javac -version
thats it.. lets ENJOY........
0 comments:
Post a Comment