Oracle Sun Java 7 Install on Centos 6 (Not Java OpenJDK)

This is guide, howto Install Sun/Oracle Java JDK and JRE 7 update 45 (7u45) 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.

If you’re looking instruction for Sun/Oracle Java JDK/JRE version 6 installation on Fedora 20/19/18, CentOS/Red Hat (RHEL) 6.5/5.10, please check this guide.

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

Read full info from here.

Install Sun/Oracle Java JDK/JRE 7u45 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 7u45 32-bit/64-bit RPM packages

Download Sun/Oracle Java 7u45 from here Select rpm package (jdk-7u45-linux-i586.rpm, jdk-7u45-linux-x64.rpm, jre-7u45-linux-i586.rpm or jre-7u45-linux-x64.rpm).

2. Change to root user.

3. Install Java JDK or JRE package

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

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

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

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

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

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

5. Check current java, javac, javaws and versions

Note: Check with restarting Mozilla Firefox and writing about:plugins on address bar.
Java 7 Browser Plugin Fedora 18 Firefox 17

Java 7 console output on Fedora 18:
Java 7 on Fedora 18 Console Output

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


Note: java with [+] is currently on use


Note: java with [+] is currently on use (32-bit) (64-bit)


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)

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



Leave a Reply