If Not True Then False

Install Oracle Java 8u151 on Fedora 27/26, CentOS/RHEL 7.4/6.9 - Comment Page: 2

This is guide, howto Install Oracle (Sun) Java JDK and JRE 8 update 151/152 (8u151/8u152) on Fedora 27/26/25/24, CentOS 7.4/6.9, Red Hat (RHEL) 7.4/6.9. I use here 151 version, but 152 installation is exactly same. Java 8 JRE/JDK update 151/152 is last public update for Java 8. If you’re looking installation instruction for older Oracle Java versions, then check Install Sun/Oracle Java...


Leave a Comment

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

Input your comment.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.


when i using
[quote]alternatives –install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
report broken link
[quote]/etc/alternatives/javaws -> /usr/java/latest/jre/bin/javaws[/quote]
The correct path is
Resolved with
[quote]ln -sf /usr/java/latest/bin/javaws /etc/alternatives/javaws[/quote]

reply Reply

Hi Dino,

Did you noticed that there is JDK (4a) and JRE (4b) commands?

reply Reply

Great tutorial, congratulations!!! :)
Just an additional information, if you were using Ferora 23 you probably have dnf command and can download Java and install it as follows “dnf install jdk-8u71-linux-x64.rpm” (current version at time I have tested). This does most of steps, you only need to do Firefox part, set javaws in alternatives if you want to switch between versions. Of corse Post-Installation Setup is also needed.

reply Reply

thank you, excellent tutorial and blog post. made my switch to Fedora so much easier!

reply Reply
Abhijit D

I ‘ve installed jdk-8u73-linux-x64.rpm on my centOS 6.7
but the version is showing java 7
and if I’ve to remove java 7 first.. then please tell me how can I do so..
as I am very new to Linux

reply Reply

great post.

I am having trouble installing java on another machine and I have gone through your steps but Firefox does not show the plugin. I can run java control panel and it says that java for browsers is enabled and has the correct location for run Firefox.
Any help would be great.

reply Reply

The existing openjdk entries include many lines of slaves. Is it important to add those lines for the Oracle JDK when adding it to alternatives?

reply Reply
Andreas Schöneck

There’s one additional issue with Oracle’s JDK:

It does not use Fedora’s global cacerts store which is located at /etc/pki/java/cacerts

You need to replace the file /usr/java/latest/jre/lib/security/cacerts with a symlink to /etc/pki/java/cacerts if you want to stay up-to-date with all the OS cacerts updates and/or are using the system mechanism to bring in custom CAs.

In Fedora’s bundled OpenJDK it is like that:
$ ls /usr/lib/jvm/java-1.8.0-openjdk- -l
lrwxrwxrwx. 1 root root 41 25. Aug 17:26 /usr/lib/jvm/java-1.8.0-openjdk- -> ../../../../../../../etc/pki/java/cacerts

reply Reply

Yay google is my world beater aided me to find this outstanding sitee
! .

reply Reply
Jette T

There is no jre folder, so you can skip that in the path.

On Fedora I had to finish with `update-alternatives –config java` to make `java -version` display the correct version.

reply Reply

Hi Christian,

You are partially right, but I see only java and javac alternatives after install on clean Fedora 27. So if you run latest install command, then you see latest and exact versions. And if you use exact version, then you see exactly same alternatives, because it’s installed already.

reply Reply