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

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
#[[email protected] jdk1.7.0_60]$ sudo -i
[[email protected] ~]# alternatives --install /usr/bin/java java /home/oracle/alice/jdk1.7.0_60/bin/java 2
[[email protected] ~]# 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:
[[email protected] ~]# alternatives --install /usr/bin/jar jar /home/oracle/alice/jdk1.7.0_60/bin/java
[[email protected] ~]# alternatives --install /usr/bin/javac javac /home/oracle/alice/jdk1.7.0_60/bin/java
[[email protected] ~]# set jar /home/oracle/alice/jdk1.7.0_60/bin/java
[[email protected] ~]# 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

时间: 2024-10-26 20:58:14

How to Install Java 7(JDK 7u60) On RHEL 6的相关文章

Android Studio 解决方法No JVM installation found. Please install a 64-bit JDK.

————————— Error launching Android Studio ————————— No JVM installation found. Please install a 64-bit JDK. If you already have a JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.

JDK 7u60 版本发布下载安装

JDK 7u60 版本发布了,主要改进包括: JavaFX 更新到 2.2.60 Java Mission Control(JMC)更新到 5.3 如果你在一个早期版本的Java中禁用了过期检查功能,那么Java可能会在首次启动时忽略deployment.expiration.check.enabled属性 Java Management API 中新增了MinHeapFreeRatio 和 MaxHeapFreeRatio标记 bug 修复列表:JDK 7u60 Bug Fixes 下载地址:

java linux jdk(yanzheng)

first,there are some default jdk in system. when we get the java 1.7.0 foldel,we should use it to instead of the default jdk. so just use sudo update-alternatives --install... to do it. java linux jdk(yanzheng)

How To Install Java with Apt-Get on Ubuntu 16.04

Koen Vlaswinkel Subscribe Share 29 How To Install Java with Apt-Get on Ubuntu 16.04 PostedApril 23, 2016 1.1mviews JAVA UBUNTU UBUNTU 16.04 Introduction Java and the JVM (Java's virtual machine) are widely used and required for many kinds of software

java运行jdk连接mysql出现了:Establishing SSL connection without server's identity verification is not recommended

注意:出现这类提示也不会影响对数据库的增删改查操作,所以不用紧张.. 在运行练习时出现下面的错误信息提示: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if

java的jdk与jre安装与环境变量配置

"工欲善其事,必先利其器."在学习java语言之前,必须搭建java所需要的开发环境.那么,学习java的开端自然是记录java的jdk与jre的安装方法以及配置环境变量的方法,以下用32位java1.7版本安装包为例,记载java的开发环境搭载. 在32位java安装包打开后弹出的第一个窗口询问安装路径,此时的安装路径为jdk的安装路径 点击下一步之后,在jdk安装进度条完成之后,会再次询问安装路径,注意,此时的安装路径为jre的安装路径.jre与jdk要安装在不同的文件路径之下,可

Java的cmd配置(也即Java的JDK配置及相关常用命令)——找不到或无法加载主类 的解决方法

Java的cmd配置(也即Java的JDK配置及相关常用命令) ——找不到或无法加载主类  的解决方法 这段时间一直纠结于cmd下Java无法编译运行的问题.主要问题描述如下: javac 命令可以正常运行,而java命令有时可以正常运行,有时却不可以,不可以的症状就是显示“找不到或无法加载主类”. 在网上找了各种资料,最终发现是因为代码里含有package语句,所以无法在cmd下运行java命令解释.class文件.而那些可以运行的文件就是因为没有使用package语句. 我这种问题的解决方法

Java Object JDK序列化总结

Java Object JDK序列化总结 @author ixenos Java序列化是在JDK 1.1中引入的,是Java内核的重要特性之一.Java序列化API允许我们将一个对象转换为流,并通过网络发送,或将其存入文件或数据库以便未来使用,反序列化则是将对象流转换为实际程序中使用的Java对象的过程.Java同步化过程乍看起来很好用,但它会带来一些琐碎的安全性和完整性问题,在文章的后面部分我们会涉及到,以下是本教程涉及的主题. Java序列化接口 使用序列化和serialVersionUID

SDK Manager failed to install 'java.exe' locking directory

转自:http://stackoverflow.com/questions/13587478/sdk-manager-failed-to-install-java-exe-locking-directory I have ran into a curious error when trying to update Android SDK Tools to revision 21 from revision 20.0.3. The ADT plug-in updated properly so n