Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed Fedora 19 and managed to get FedoraUtils installed. So I chose java oracle. after installation I could see in the FedoraUtils list that oracle java (installed) but I can't see the Oracle Java anywhere.

As an Ubuntu user I would run the update-java-alternatives -l command but it didn't work. Below is the output of alternatives --list:

mta                      auto    /usr/sbin/sendmail.sendmail
javac                    auto    /usr/java/latest/bin/javac
jre_1.7.0_openjdk        auto    /usr/lib/jvm/jre-1.7.0-openjdk-
mkisofs                  auto    /usr/bin/genisoimage
ld                       auto    /usr/bin/ld.bfd
java                     auto    /usr/java/latest/bin/java
jre_1.7.0                manual  /usr/lib/jvm/java-1.7.0-openjdk-
pax                      auto    /usr/bin/spax
print                    auto    /usr/bin/lpr.cups
jre_openjdk              manual  /usr/lib/jvm/java-1.7.0-openjdk-
libnssckbi.so.x86_64     auto    /usr/lib64/pkcs11/p11-kit-trust.so
libjavaplugin.so.x86_64  auto    /usr/java/default/jre/lib/amd64/libnpjp2.so
fakeroot                 auto    /usr/bin/fakeroot-tcp
unrar                    auto    /usr/bin/unrar-nonfree
xinputrc                 auto    /etc/X11/xinit/xinput.d/ibus.conf
cifs-idmap-plugin        auto    /usr/lib64/cifs-utils/idmapwb.so

I don't remember typing openJDK but apparently it's installed. I would really like to find out where's oracle-java. I don't mind having the 2. When I check for the version in order to get the default java:

[joseph@localhost ~]$ java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
  • Question 1 : Where is oracle java installed
  • Question 2 : How to check default java in fedora
  • Question 3 :I will like to set up system environment for JAVA_HOME, how does it work in /etc/environment?

EDIT all the commands suggested by @sim my screen looks this way: fedoraulits additional software screen

#type java 
java is /bin/java

#rpm -aq | grep jdk
jdk-1.7.0_40-fcs.x86_64  // is this one oracle java?

#alternatives --display java |grep best
Current `best' version is /usr/java/latest/bin/java.

#type -a /usr/java/default/bin/java
/usr/java/default/bin/java is /usr/java/default/bin/java

#rpm -qf /usr/java/default/bin/java
jdk-1.7.0_40-fcs.x86_64 // I assume this one is oracle java. 

Is /usr/java/default/bin/java the home for oracle java?

share|improve this question
Yes, jdk-1.7.0_40-fcs.x86_64 is the oracle java. – slm Sep 15 '13 at 12:44
Things are a bit different In fedora. Apparently /etc/environment is empty is that normal ?I hesitated about putting the have home in there – black sensei Sep 15 '13 at 14:39
I'm running Fedora. Do you mean coming from the Debian/Ubuntu side? – slm Sep 15 '13 at 14:40
Exactly am more used to Debian/Ubuntu family – black sensei Sep 15 '13 at 14:50
up vote 5 down vote accepted

locating java

Try using this command:

$ type java

to find out where Oracle Java is installed. Also open JDK is the opensource project's version of Java, you have to download and install Oracle Java from the Java website. It comes as an RPM you can install.

Java package

If you've used FedoraUtils to automatically install packages then these should be showing up when you query the RPM database:

$ rpm -aq | grep jdk

Backtracking with alternatives

I typically do it like this.

  1. locate within alternatives

    $ alternatives --display java |grep best
    Current `best' version is /usr/java/default/bin/java.
  2. confirm with type

    $ type -a /usr/java/default/bin/java
    /usr/java/default/bin/java is /usr/java/default/bin/java
  3. query RPM

    $ rpm -qf /usr/java/default/bin/java

NOTE: The jdk... packages are what Oracle's label's their Java packages as. Go figure, it stands for Java Development Kit. There is also a JRE package you'll see from time to time, that's the Java Runtime Environment.

share|improve this answer
thanks for your answer. does that mean that oracle java has never been installed ? – black sensei Sep 15 '13 at 11:02
@blacksensei - were you all set? – slm Sep 15 '13 at 14:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.