Install Oracle Java 8u191 on Fedora 29/28, CentOS/RHEL 7.5/6.10 - Comment Page: 2
This is guide, howto Install Oracle (Sun) Java JDK and JRE 8 update 191 (8u191) on Fedora 29/28/27/26, CentOS 7.5/6.10, Red Hat (RHEL) 7.5/6.10.
If you're looking installation instruction for older Oracle Java versions, then check Install Sun/Oracle Java JDK/JRE 7 on Fedora 24/23/22/21/20/19, CentOS/Red Hat (RHEL) 7.2/6.9/5.11 or Install Sun/Oracle Java JDK/JRE 6 on Fedora 20/19/18, CentOS/Red Hat (RHEL) 6.5/5.10.
[inttf_post_ad1]
What's new in Oracle Java 8
Java Programming Language
Lambda Expressions, a new language feature
Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for...
Dear,
when i using
[quote]alternatives –install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
[/quote]
report broken link
[quote]/etc/alternatives/javaws -> /usr/java/latest/jre/bin/javaws[/quote]
The correct path is
[quote]/usr/java/latest/bin/javaws[/quote]
Resolved with
[quote]ln -sf /usr/java/latest/bin/javaws /etc/alternatives/javaws[/quote]
Hi Dino,
Did you noticed that there is JDK (4a) and JRE (4b) commands?
Sorry,
4b
I’m using Jre
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.
thank you, excellent tutorial and blog post. made my switch to Fedora so much easier!
I ‘ve installed jdk-8u73-linux-x64.rpm on my centOS 6.7
but the version is showing java 7
why..??
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
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.
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?
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-1.8.0.102-1.b14.fc24.x86_64/jre/lib/security/cacerts -l
lrwxrwxrwx. 1 root root 41 25. Aug 17:26 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-1.b14.fc24.x86_64/jre/lib/security/cacerts -> ../../../../../../../etc/pki/java/cacerts
Yay google is my world beater aided me to find this outstanding sitee
! .
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.
I didn’t see this mentioned here but for firefox on Fedora 25 after version 53 no more support for jre plugin –
https://bugzilla.mozilla.org/show_bug.cgi?id=1269807
to work around it downgrade to Fedora 49 –
# dnf install firefox-49.0-2.fc25.x86_64 –allowerasing
According fedoraproject setup alternatives is no longer required since java 8u40
https://ask.fedoraproject.org/en/question/59412/sticky-how-do-i-install-oracle-java/
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.
Thank you for this great article, I have shared iit on Facebook.
Thanks, very helpful and straight forward.
javaws still fails on Fedora 29:
$ java -version
java version “1.8.0_191”
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
$ ls -l /lib/libnsl.so.1
lrwxrwxrwx 1 root root 14 ago 29 14:44 /lib/libnsl.so.1 -> libnsl-2.28.so*
$ /usr/java/jre1.8.0_191-amd64/bin/javaws
/usr/java/jre1.8.0_191-amd64/bin/javaws: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory
$ ldd /usr/java/jre1.8.0_191-amd64/bin/javaws
linux-vdso.so.1 (0x00007ffd21bd5000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f8c5f66f000)
libnsl.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007f8c5f669000)
libm.so.6 => /lib64/libm.so.6 (0x00007f8c5f4e5000)
libc.so.6 => /lib64/libc.so.6 (0x00007f8c5f31f000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f8c5f2f4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8c5f7ed000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f8c5f2ed000)
Solution was to install the 64b version:
dnf install libnsl.x86_64