Install Oracle Java 7u79/80 on Fedora 23/22, CentOS/RHEL 7.2/6.7/5.11

java-logo
Please note: This guide still working normally if you want install Sun/Oracle Java 7, but if you want Java 8 version, then check Install Oracle Java JDK/JRE 8 on Fedora, CentOS/RHEL.

This is guide, howto Install Sun/Oracle Java JDK and JRE 7 CPU (7u79) and PSU (7u80) on Fedora 23/22/21/20/19/18/17/16/15/14/13/12, CentOS 7.2/6.7/5.11, Red Hat (RHEL) 7.2/6.7/5.11. Read more, what is difference between CPU and PSU release.

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 7u79/80 on Fedora 23/22/21/20, CentOS/Red Hat (RHEL) 7.2/6.7/5.11

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

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

2. Change to root user.

3. Install Java JDK or JRE package

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)

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

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

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)

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

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

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

Note: Check libjavaplugin.so 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

java

Note: java with [+] is currently on use

javaws

Note: java with [+] is currently on use

libjavaplugin.so (32-bit)

libjavaplugin.so.x86_64 (64-bit)

javac

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_79)

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

Share this post

254 Comments

  1. Thanks man, This help me to setup my VPS Java installation.

    Reply
  2. You cannot ignore this. The JVM will not load/work correctly. When this happened to me I had an old, funky install of the rpm that I had to remove first. Once I was able to remove it, the install went smoothly.

    Reply
  3. Hi,
    Thanks very much for the procedure, iv been trying to enable java on my fedora for a really long time, with no luck, i keep getting the same error “Error, Click for details”, i also followed your procedure with the same result, bellow are my info :

    alsaadi:/home/alsaadi #java -version
    java version “1.7.0_65”
    Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
    alsaadi:/home/alsaadi #javaws
    Java(TM) Web Start 10.65.2.17-fcs
    alsaadi:/home/alsaadi #uname -a
    Linux alsaadi 3.15.6-200.fc20.x86_64 #1 SMP Fri Jul 18 02:36:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

    Any idea how to fix this issue ?

    Reply
  4. Hi,
    Thanks very much for the procedure, iv been trying to enable java on my fedora for a really long time, with no luck, i keep getting the same error “Error, Click for details”, i also followed your procedure with the same result, bellow are my info :

    alsaadi:/home/alsaadi #java -version
    java version “1.7.0_65″
    Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
    alsaadi:/home/alsaadi #javaws
    Java(TM) Web Start 10.65.2.17-fcs
    alsaadi:/home/alsaadi #uname -a
    Linux alsaadi 3.15.6-200.fc20.x86_64 #1 SMP Fri Jul 18 02:36:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

    Any idea how to fix this issue ?

    Reply
    • Hi Ahmed,

      So you get this error when you start “something” with Web Start?

      What details shows?

      Reply
  5. thanks a lot

    Reply
  6. Thanks a lot, it’s so helpful!

    Reply
  7. What about –slave option for the alternatives –install? Might worth mentioning that changing java version will automatically will change javac etc in this case.

    Reply
  8. Excellent help, thank you!

    Reply
  9. Hello, nice tutorial.

    I have a issue, I want to know how can I remove any version of JAVA installed in my System manually and sets my system cleans that the first time?.

    Cheers!

    Reply
  10. Nice article.

    The only bad thing is that its difficult to read the dark blue on dark grey background for the syntax. Otherwise its a good article.

    Reply
  11. Most consistent tutorial for Fedora! Thanks!

    Reply
  12. y have this error

    javaws: no se encontró la orden
    in english
    javaws: command not found

    Reply
    • Hi epagano,

      Could you tell little more what you tried to install (JDK or JRE) and what commands you run?

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *