Install Oracle Java 8u191 on Fedora 29/28, CentOS/RHEL 7.5/6.10 - Comment Page: 1
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...
Excellent guide! Question though: How can I upgrade my Oracle JDK installation once a new version inevitably comes out?
Hi Daniel Vu,
Thanks! You can update it using following procedure, if you use latest method:
1. Download new package
2. Install it using following command
Replace version and arch with your own.
Then it should work normally.
Why oracle site is an “untrusted connection”?
And why “alternatives –install /usr/bin/jar jar /usr/java/jdk1.8.0_05/bin/jar 200000” return “impossible to link /usr/bin/jar : no file or dir found”(from french translation)?
Hi RedFruit,
What you mean by “untrusted connection”?
Could you post output of following commands:
Works like a charm. Thx!
Hi JR, Excellent post. Thank you.
I have a problem installing on Fedora 21. When I installed JDK8 using
rpm -Uvh /home/chetan/Downloads/jdk-8u11-linux-x64.rpm
, rather than installing a new copy, the current JDK (1.7_67) was updated. How can I install both JDK 7 and JDK 8 simultaneously ?Thanks
Chet
I never run installs for java jre or sdk. Always uncompress a zip or gz and manually copy the uncompressed directory to where you want your java versions.
I have figured this out myself. I should rather be using rpm -ivh to install a new jdk package instead of rpm -Uvh
I do prefer
yum localinstall -y /zzzzz/yyy/www.rpm
Just in case it needs some dependencies
Hi, great guide. I just updated my F20 installation with jre1.8.0_11, and everything is working fine now (I couldn’t get openJDK working right so I went with Oracle). There is one strange thing though, env shows a previous version of java that’s not even on my system anymore (for both root and my normal username). How do I update the system to get the right environment variable in there?
[[email protected] icb]# env
JAVA_HOME=/usr/java/jre1.6.0_45
(all the other stuff is edited out)
[[email protected] ~]$ env
JAVA_HOME=/usr/java/jre1.6.0_45
Problem solved. I thought it would be enough to log out of the terminal; I had to log right out of X and back in. Now the environment shows the right path (/usr/java/latest)
After i try to installed jdk-8u11-linux-x64.rpm, i can run java program but i cannot compile program with javac. This is error that shown below
<blockquote cite="javac -version
Exception in thread "main" java.lang.IllegalArgumentException: Unmatched braces in the pattern.
at java.text.MessageFormat.applyPattern(MessageFormat.java:508)
at java.text.MessageFormat.(MessageFormat.java:362)
at java.text.MessageFormat.format(MessageFormat.java:840)
at com.sun.tools.javac.util.JavacMessages.getLocalizedString(JavacMessages.java:200)
at com.sun.tools.javac.util.JavacMessages.getLocalizedString(JavacMessages.java:141)
at com.sun.tools.javac.util.JavacMessages.getLocalizedString(JavacMessages.java:135)
at com.sun.tools.javac.util.Log.localize(Log.java:684)
at com.sun.tools.javac.util.Log.printLines(Log.java:497)
at com.sun.tools.javac.main.Main.bugMessage(Main.java:587)
at com.sun.tools.javac.main.Main.compile(Main.java:568)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)”>
and i just test with printing “Hello World” and this is error
javac Games.java
f:l:_pLm
public static void main(String[]args){
^
f:l:_pLm
public static void main(String[]args){
^
f:l:_pLm
Hi totten25,
I just updated this guide to latest version 8u20, could you first install it and then try javac again? I just tested javac and it’s working normally for me.
Thanks!
This tutorial helped me!
i have installed jre but failed to rum java application in firefox. A message pop up saying “application blocked by java security, your security settings have blocked a self signed application from running”
Please help
thanks
Hi rubens,
If you are not sure is it reliable site, then you should contact the developer or publisher of this application and let them know about the application being blocked.
But if you trust this site, then open Java Control Panel using following command:
Then go to Security tab and add this site to “Exception site list”.
These are probably dumb questions but they occurred to me so here goes. Do I need to install both the jre package and the jdk package? I assumed that just the jdk would work for both. And can I just the “latest” steps or do I need to follow both the “latest” and the “absolute” steps?
Hi Edward,
You need to install just JRE or JDK. JRE is just Java Runtime Environment and JDK is Java Development Kit, which includes JRE.
So if you want run Java apps, then JRE is enough, but if you want develop (and run) Java apps, then you need JDK.
You can use just “latest” steps and skip absolute steps. Absolute steps are there just as another possibility to do this, if you want install and run some specific Java version.
Nice and great Tutorial.
I want to know, How can I remove any version of Java manually and set the system as the same state that it was before had installed this version or any version of Java?
PD: It is correctly to do: Install Java using:
rpm -i java-jre*.rpm java-jdk*.rpm
It this method work as well to install Java or it is neccesary config it using alternatives –config ??
Cheers!
Hi Viitico,
You can remove Oracle Java using following commands (this is just an example):
It worked for me on Fedora 21. Thank you.
this string creates a broken link
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/jre/lib/i386/libnpjp2.so 200000
i have resolve with
ln -sf /usr/java/latest/lib/i386/libnpjp2.so /etc/alternatives/libjavaplugin.so
ln -sf /usr/java/latest/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/libjavaplugin.so
I’m a Fedora 22 user and I’m having trouble with steps 4a and 4b. When I type in the the alternatives –install command the terminal appears to no install anything. It simply prompts me to type in another command as root user. I also only want to install the JRE and have the 64 bit version. Do I pick and choose which command lines to use? either way it doesn’t look like anything is happening. Below is an example.
[[email protected] -]# alternatives –install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
[[email protected] -]# alternatives –install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
[[email protected] -]# alternatives –install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 200000
Hi Lemiwinks,
It actually install it without any notices, could you post output of following commands: