Install Oracle Java JDK/JRE 7u55 on Fedora 20/19, CentOS/RHEL 6.5/5.10

What’s new in Sun/Oracle Java 7


  • VM
    • Compressed 64-bit object pointers

    • Garbage-First GC (G1)

    • JSR 292: VM support for non-Java languages (InvokeDynamic)

  • Lang
    • JSR 294: Language and VM support for modular programming

    • JSR 308: Annotations on Java types

    • JSR TBD: Small language enhancements (Project Coin)

    • JSR TBD: Project Lambda

  • Core
    • Modularization (Project Jigsaw)

    • Upgrade class-loader architecture

    • Method to close a URLClassLoader

    • Unicode 5.1

    • Concurrency and collections updates (jsr166y)

    • JSR 203: More new I/O APIs for the Java platform (NIO.2)

    • SCTP (Stream Control Transmission Protocol)

    • SDP (Sockets Direct Protocol)

    • Elliptic-curve cryptography (ECC)

  • Client
    • XRender pipeline for Java 2D

    • Nimbus look-and-feel for Swing

    • Swing JLayer component

  • Web
    • Update the XML stack

Install Sun/Oracle Java JDK/JRE 7u55 on Fedora 20/19/18/17/16/15/14/13/12,
CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10, Red Hat (RHEL)
6.5/6.4/6.3/6.2/6.1/6/5.10


1. Download Sun/Oracle Java JDK/JRE 7u55 32-bit/64-bit RPM packages


Download Sun/Oracle Java 7u55 from here http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Select rpm package (jdk-7u55-linux-i586.rpm, jdk-7u55-linux-x64.rpm,
jre-7u55-linux-i586.rpm or jre-7u55-linux-x64.rpm).

2. Change to root user.

sudo -i
## OR ##
su -

3. Install Java JDK or JRE package

## JDK 32-bit ##
rpm -Uvh /path/to/binary/jdk-7u55-linux-i586.rpm
 
## JDK 64-bit ##
rpm -Uvh /path/to/binary/jdk-7u55-linux-x64.rpm
 
## JRE 32-bit ##
rpm -Uvh /path/to/binary/jre-7u55-linux-i586.rpm
 
## JRE 64-bit ##
rpm -Uvh /path/to/binary/jre-7u55-linux-x64.rpm

4a. Install Sun/Oracle JDK java, javaws,
libjavaplugin.so (for Firefox/Mozilla) and javac with
alternatives –install command


Use Java JDK latest version (/usr/java/latest)

## java ##
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
## javaws ##
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
 
## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/jre/lib/i386/libnpjp2.so 200000
 
## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 200000
 
## Install javac only if you installed JDK (Java Development Kit) package ##
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 200000

Use Java JDK absolute version (/usr/java/jdk1.7.0_55)

## java ##
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_55/jre/bin/java 200000
## javaws ##
alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_55/jre/bin/javaws 200000
 
## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.7.0_55/jre/lib/i386/libnpjp2.so 200000
 
## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.7.0_55/jre/lib/amd64/libnpjp2.so 200000
 
## Install javac only if you installed JDK (Java Development Kit) package ##
alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_55/bin/javac 200000
alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_55/bin/jar 200000

4b. Install Sun/Oracle JRE java, javaws and
libjavaplugin.so (for Firefox/Mozilla) with alternatives
–install
command


Use Java JRE latest version (/usr/java/latest)

## java ##
alternatives --install /usr/bin/java java /usr/java/latest/bin/java 200000
 
## javaws ##
alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000
 
## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/lib/i386/libnpjp2.so 200000
 
## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/lib/amd64/libnpjp2.so 200000

Use Java JRE absolute version (/usr/java/jre1.7.0_55)

## java ##
alternatives --install /usr/bin/java java /usr/java/jre1.7.0_55/bin/java 200000
 
## javaws ##
alternatives --install /usr/bin/javaws javaws /usr/java/jre1.7.0_55/bin/javaws 200000
 
## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jre1.7.0_55/lib/i386/libnpjp2.so 200000
 
## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jre1.7.0_55/lib/amd64/libnpjp2.so 200000

5. Check current java, javac, javaws and libjavaplugin.so versions

java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
 
javaws
Java(TM) Web Start 10.51.2.13-fcs
[...]
 
javac -version
javac 1.7.0_55

Note: Check libjavaplugin.so with restarting Mozilla Firefox and
writing about:plugins on address bar.

Java 7 console output on Fedora 18:

6. Swap between OpenJDK and Sun/Oracle Java JDK/JRE 6 and 7 versions


java

alternatives --config java
 
There are 5 programs which provide ‘java‘.
 
Selection Command
-----------------------------------------------
* 1 /usr/java/jdk1.6.0_24/jre/bin/java
2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
+ 3 /usr/java/jdk1.6.0_26/jre/bin/java
4 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
5 /usr/java/jdk1.7.0_55/jre/bin/java
 
Enter to keep the current selection[+], or type selection number: 5

Note: java with [+] is currently on use

javaws

alternatives --config javaws
 
There are 3 programs which provide ‘javaws‘.
 
Selection Command
-----------------------------------------------
* 1 /usr/java/jdk1.6.0_24/jre/bin/javaws
+ 2 /usr/java/jdk1.6.0_26/jre/bin/javaws
3 /usr/java/jdk1.7.0_55/jre/bin/javaws
 
Enter to keep the current selection[+], or type selection number: 3

Note: java with [+] is currently on use

libjavaplugin.so (32-bit)

alternatives --config libjavaplugin.so
 
There are 3 programs which provide ‘libjavaplugin.so‘.
 
Selection Command
-----------------------------------------------
* 1 /usr/java/jdk1.6.0_24/jre/lib/i386/libnpjp2.so
+ 2 /usr/java/jdk1.6.0_26/jre/lib/i386/libnpjp2.so
3 /usr/java/jdk1.7.0_55/jre/lib/i386/libnpjp2.so
 
Enter to keep the current selection[+], or type selection number: 3

libjavaplugin.so.x86_64 (64-bit)

alternatives --config libjavaplugin.so.x86_64
 
There are 3 programs which provide ‘libjavaplugin.so.x86_64‘.
 
Selection Command
-----------------------------------------------
* 1 /usr/java/jdk1.6.0_24/jre/lib/amd64/libnpjp2.so
+ 2 /usr/java/jdk1.6.0_26/jre/lib/amd64/libnpjp2.so
3 /usr/java/jdk1.7.0_55/jre/lib/amd64/libnpjp2.so
 
Enter to keep the current selection[+], or type selection number: 3

javac

alternatives --config javac
 
There are 3 programs which provide ‘javac‘.
 
Selection Command
-----------------------------------------------
* 1 /usr/java/jdk1.6.0_24/bin/javac
+ 2 /usr/java/jdk1.6.0_26/bin/javac
3 /usr/java/jdk1.7.0_55/bin/javac
 
Enter to keep the current selection[+], or type selection number: 3

Note: java with [+] is currently on use

Post-Installation Setup

Add JAVA_HOME environment variable to /etc/profile
file or $HOME/.bash_profile file

Java JDK and JRE latest version (/usr/java/latest)

## export JAVA_HOME JDK/JRE ##
export JAVA_HOME="/usr/java/latest"

Java JDK and JRE absolute version
(/usr/java/jdk1.7.0_55)

## export JAVA_HOME JDK ##
export JAVA_HOME="/usr/java/jdk1.7.0_55"
 
## export JAVA_HOME JRE ##
export JAVA_HOME="/usr/java/jre1.7.0_55"

Follow If Not True Then False Updates!

Install Oracle Java JDK/JRE 7u55 on Fedora 20/19, CentOS/RHEL
6.5/5.10,码迷,mamicode.com

Install Oracle Java JDK/JRE 7u55 on Fedora 20/19, CentOS/RHEL
6.5/5.10

时间: 2024-12-13 04:04:22

Install Oracle Java JDK/JRE 7u55 on Fedora 20/19, CentOS/RHEL 6.5/5.10的相关文章

How To Manually Install Oracle Java on Ubuntu

Introduction Java is a programming technology originally developed by Sun Microsystems and later acquired by Oracle. Oracle Java is a proprietary implementation for Java that is free to download and use for commercial use, but not to redistribute, th

ubuntu——How to Install Oracle Java JDK8

Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.     uname -a or file /sbin/init Linux caochu-Inspiron-N5110 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51

Install MySQL 5.7 on Fedora 25/24, CentOS/RHEL 7.3/6.8/5.11

1. Change root user Bash su - ## OR ## sudo -i 2. Install MySQL YUM repository Fedora Bash ## Fedora 25 ## dnf install https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm ## Fedora 24 ## dnf install https://dev.mysql.com/get/mysql57

Install Adobe Flash Player 11.2 on CentOS/RHEL 7/6/5, Fedora 20/19

Adobe Flash Player are very useful for watching videos in web browser online. Without flash player most of the videos will not play in your browser. This article will help you to install Adobe flash player plugin for your browsers in CentOS 6/5, Redh

fedora 20 与 centos 6.5 搭建openldap服务器心得

目标:使用ldap做为系统用户的数据目录,基于web管理ldap数据. 安装 使用 YUM 安装方式 ,由于要使用web方式管理LDAP服务器,也要安装APACHE.PHP和ldap相关的软件包,要想通过ldap验证用户,一定要安装nss-pam-ldapd和pam_ldap.web管理使用ldap-account-manager或phpldapadmin,lam和phpldapadmin可以直接用rpm包安装.centos 6.5 使用openldap 2.4.23, fedora 使用ope

Centos 安装 Oracle Java JDK

Centos 安装 jdk 创建目录,用来存放下载的 JDK cd /usr/local mkdir -p tools cd tools 下载JDK,后边的下载地址你可以到 orcal 官网去获取最新的版本,或者你想要的版本进行替换. # jdk 8 已经包含 jre wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=ac

在CentOS 7/6.5/6.4 中安装Java JDK 8

本教程介绍如何安装和在CentOS7,6.5,和6.4的服务器上配置最新的Oracle的JavaJDK.虽然,这些步骤应该同样适用于其他基于RPM的发行版,如RHEL7,6.x,Scientific Linux6.x和Fedora. 首先,在你的服务器上运行一下更新. yum update 然后,在您的系统上搜索,任何版本的已安装的JDK组件. rpm -qa | grep -E '^open[jre|jdk]|j[re|dk]' 输出结果如下: gobject-introspection-1.

Ubuntu 16.04安装Java JDK

Java JDK有两个版本,一个开源版本Openjdk,还有一个Oracle官方版本jdk.下面记录在Ubuntu 16.04上安装Java JDK的步骤. 安装openjdk 更新软件包列表: $ sudo apt-get update 安装openjdk-8-jdk: $ sudo apt-get install openjdk-8-jdk 查看java版本: $ java -version 安装Oracle Java JDK 首先,安装依赖包: $ sudo apt-get install

JDK JRE区别

JDK里面的工具也是用JAVA编写的,它们本身运行的时候也需要一套JRE,如C:/Program Files/Java/jdk1.5.x/目录下的JRE.而C:/Program Files/Java/目录下的JRE是用来执行我们自己编写的JAVA程序.当然,两套JRE中的任何一套都可以用来执行我们自己编写的JAVA程序, 但是JDK里面的工具只能由C:/Program Files/Java/jdk1.5.x/目录下的JRE来执行. 也就是说jdk(java development kit)是开发