Installation / Migration JAVA JDK 1.8 In Unix / Linux System..
Step 1: Java Installation process
Download Java JDK 1.8 Version (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
Copy JDK Software (jdk1.8.0_77.zip) to this path ..[root@RAMA jdk1.8.0_77]#cd /usr/java/
Go to this path ..[root@RAMA jdk1.8.0_77]#cd /usr/java
And unzip Java software [root@RAMA jdk1.8.0_77]#unzip jdk1.8.0_77.zip
Open following file and set the java home directory for all users
[root@RAMA jdk1.8.0_77]#cat /etc/profile
[root@RAMA jdk1.8.0_77]#export JAVA_HOME=/usr/java/jdk1.8.0_77
[root@RAMA jdk1.8.0_77]#export PATH=$JAVA_HOME/bin:$PATH
[root@RAMA jdk1.8.0_77]#source /etc/profile
[root@RAMA jdk1.8.0_77]#java -version
If Java version showing older version then we need to update java version
Step 2: Java version updation from JDK 1.7 to JDK 1.8
update java, javac, jar alternatives as:
[root@RAMA jdk1.8.0_77]#cd /usr/java/jdk1.8.0_77
check available java alternatives
[root@RAMA jdk1.8.0_77]# update-alternatives --config java
Install java jdk 1.8 alternative
[root@RAMA jdk1.8.0_77]# update-alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_80/bin/java 100
Similarly Update alternatives for both Javac and Jar
[root@RAMA jdk1.8.0_77]# update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_80/bin/javac 100
[root@RAMA jdk1.8.0_77]# update-alternatives --config javac
[root@RAMA jdk1.8.0_77]# update-alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_80/bin/jar 100
[root@RAMA jdk1.8.0_77]# update-alternatives --config jar
Step 3: Setting up Java Environment Variables
[root@RAMA jdk1.8.0_77]#export JAVA_HOME=/usr/java/jdk1.8.0_77
[root@RAMA jdk1.8.0_77]#export JRE_HOME=/usr/java/jdk1.8.0_77/jre
[root@RAMA jdk1.8.0_77]#export PATH=$JAVA_HOME/bin:$PATH
update above entries into this file (/etc/profile) for permanent to all users
Step 4: Give permissions and check java version
[root@RAMA jdk1.8.0_77]# chmod -R 755 /usr/bin/java
[root@RAMA jdk1.8.0_77]# chmod -R 755 /usr/bin/javac
[root@RAMA jdk1.8.0_77]# chmod -R 755 /usr/bin/jar
[root@RAMA jdk1.8.0_77]# java -version
all the Best..
Step 1: Java Installation process
Download Java JDK 1.8 Version (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
Copy JDK Software (jdk1.8.0_77.zip) to this path ..[root@RAMA jdk1.8.0_77]#cd /usr/java/
Go to this path ..[root@RAMA jdk1.8.0_77]#cd /usr/java
And unzip Java software [root@RAMA jdk1.8.0_77]#unzip jdk1.8.0_77.zip
Open following file and set the java home directory for all users
[root@RAMA jdk1.8.0_77]#cat /etc/profile
[root@RAMA jdk1.8.0_77]#export JAVA_HOME=/usr/java/jdk1.8.0_77
[root@RAMA jdk1.8.0_77]#export PATH=$JAVA_HOME/bin:$PATH
[root@RAMA jdk1.8.0_77]#source /etc/profile
[root@RAMA jdk1.8.0_77]#java -version
If Java version showing older version then we need to update java version
Step 2: Java version updation from JDK 1.7 to JDK 1.8
update java, javac, jar alternatives as:
[root@RAMA jdk1.8.0_77]#cd /usr/java/jdk1.8.0_77
check available java alternatives
[root@RAMA jdk1.8.0_77]# update-alternatives --config java
Install java jdk 1.8 alternative
[root@RAMA jdk1.8.0_77]# update-alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_80/bin/java 100
Similarly Update alternatives for both Javac and Jar
[root@RAMA jdk1.8.0_77]# update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_80/bin/javac 100
[root@RAMA jdk1.8.0_77]# update-alternatives --config javac
[root@RAMA jdk1.8.0_77]# update-alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_80/bin/jar 100
[root@RAMA jdk1.8.0_77]# update-alternatives --config jar
Step 3: Setting up Java Environment Variables
[root@RAMA jdk1.8.0_77]#export JAVA_HOME=/usr/java/jdk1.8.0_77
[root@RAMA jdk1.8.0_77]#export JRE_HOME=/usr/java/jdk1.8.0_77/jre
[root@RAMA jdk1.8.0_77]#export PATH=$JAVA_HOME/bin:$PATH
update above entries into this file (/etc/profile) for permanent to all users
Step 4: Give permissions and check java version
[root@RAMA jdk1.8.0_77]# chmod -R 755 /usr/bin/java
[root@RAMA jdk1.8.0_77]# chmod -R 755 /usr/bin/javac
[root@RAMA jdk1.8.0_77]# chmod -R 755 /usr/bin/jar
[root@RAMA jdk1.8.0_77]# java -version
all the Best..
No comments:
Post a Comment