码迷,mamicode.com
首页 > 编程语言 > 详细

How to Install Java 7(JDK 7u60) On RHEL 6

时间:2014-07-01 21:35:32      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:http   java   strong   html   cti   linux   

Step1 Download File
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
#tar xzf jdk-7u60-linux-x64.gz

Step2 Install JAVA using Alternatives
#cd /home/oracle/alice/jdk1.7.0_60
#[oracle@infbjvm1XX jdk1.7.0_60]$ sudo -i
[root@infbjvm1XX ~]# alternatives --install /usr/bin/java java /home/oracle/alice/jdk1.7.0_60/bin/java 2
[root@infbjvm1XX ~]# alternatives --config java
There are 3 programs which provide ‘java‘.
  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
   2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
   3           /home/oracle/alice/jdk1.7.0_60/bin/java
Enter to keep the current selection[+], or type selection number: 3
#
Now you may also required to setup javac and jar commands path using alternatives:
[root@infbjvm1XX ~]# alternatives --install /usr/bin/jar jar /home/oracle/alice/jdk1.7.0_60/bin/java
[root@infbjvm1XX ~]# alternatives --install /usr/bin/javac javac /home/oracle/alice/jdk1.7.0_60/bin/java
[root@infbjvm1XX ~]# set jar /home/oracle/alice/jdk1.7.0_60/bin/java
[root@infbjvm1XX ~]# set javac /home/oracle/alice/jdk1.7.0_60/bin/javac

Step3 Check JAVA Version
# java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

Step4 Setup Environment Variables
export JAVA_HOME=/home/oracle/alice/jdk1.7.0_60/
export JRE_HOME=/home/oracle/alice/jdk1.7.0_60/jre
export PATH=$PATH:/home/oracle/alice/jdk1.7.0_60/bin:/home/oracle/alice/jdk1.7.0_60/jre/bin

How to Install Java 7(JDK 7u60) On RHEL 6,布布扣,bubuko.com

How to Install Java 7(JDK 7u60) On RHEL 6

标签:http   java   strong   html   cti   linux   

原文地址:http://www.cnblogs.com/lzhairs/p/3816758.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!