Search This Blog

Lets go..




Manage your Inventory | Grow your restaurant business | Manage your Employee | Control your accounts

Thursday

How to install JDK latest version in your machine and install java environment properly

Ubuntu ::
Just run these commands ::
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ sudo apt-get install oracle-java8-set-default
Test JDK has been installed successfully :: javac

CentOS 6 ::
Downoad latest JDK from here:: http://bc.vc/byid4w
Download JDK .tar.gz file according to your OS bit 32 or 64

Just run these commands ::
[root@db-tom ~]# mkdir /usr/java
[root@db-tom ~]# mv jdk-8u73-linux-x64.tar.gz   /usr/java
[root@db-tom ~]# cd /usr/java
[root@db-tom ~]# tar -xzf jdk-8u73-linux-x64.tar.gz
[root@db-tom ~]# vim ~/.bash_profile
Add  below two lines in ~/.bash_profile
Press i to edit ~/.bash_profile
JAVA_HOME=/usr/java/jdk1.8.0_73
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
After adding above lines
Press Esc button then write :wq and press Enter button

Test java has been successfully installed ::
[root@db-tom ~]# echo $JAVA_HOME
[root@db-tom ~]# /usr/java/jdk1.8.0_73


1 comment:

Thanks for your opinion