Ask Your Question
2

How to make OracleJdk default on fedora 23?

asked 2016-03-11 09:05:50 -0500

yashwanth sam gravatar image

updated 2016-03-12 01:27:57 -0500

mether gravatar image

i switched from ubuntu to fedora and everything looks not much easy as before, i'm beginner but i loved it.

my problem is i removed all the sources of openjdk by
yum -y remove java*
and installed oracle jdk and everything is fine while

java -version shows
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

And now i installed Libre Office which was downloading openjdk along with it and after installing LibreOffice

javac -version --> shows javac 1.7.0_60 (Oracle JDK) and
java -version --> shows
java version "1.8.0_xx"
OpenJDK Runtime Environment
OpenJDK 64-Bit Server VM

how to set OracleJDK as default for runtime environement?? while keeping Libre office?(i mean OpenJdk Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-11 11:49:26 -0500

hhlp gravatar image

you have to Switch between java version :

sudo alternatives --config java

regards.,

edit flag offensive delete link more

Comments

Thankyou! it solved my problem by looking into these alternatives commands. at first --config java just showed openjdk, as one option. I added oracle jdk as alternative by

sudo alternatives --install /usr/bin/java java <oracle jre="" path=""> 1
sudo update-alternatives --config java

i selected Oraclejre and everything is fine now!

yashwanth sam gravatar imageyashwanth sam ( 2016-03-11 20:22:24 -0500 )edit

on fedora25: alternatives --config java

christianbueno gravatar imagechristianbueno ( 2017-06-16 15:38:41 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-11 09:05:50 -0500

Seen: 2,049 times

Last updated: Mar 11 '16