Ask Your Question

how to install java in fedora 17

asked 2013-01-08 15:05:43 -0600

jeremy gravatar image

updated 2013-01-10 00:19:39 -0600

Jomoos gravatar image

what are the steps to install java because i need it urgently i am new to fedora my version is fedora 17 please put the steps to installing and running please!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2013-01-09 22:53:00 -0600

Jomoos gravatar image

In Fedora, you have mainly two choices available for Java. OpenJDK and Oracle JDK. Also, you haven't specified whether you want to install the JDK(for development and testing of java applications) or JRE(for running Java applications only, no development or testing).

1. OpenJDK

I strongly suggest to use this. It is open source, and is available in Fedora repository. Also in my experience, Java applications like Netbeans works well with OpenJDK than the OracleJDK on my Fedora 17. You can simply install it using yum.

The Java Runtime Environment(JRE) is probably installed on your system by default. If not, you can install Java 7 runtime environment using:

yum install -y java-1.7.0-openjdk

If you want to develop Java applications, then you can install the development tools using

yum install -y java-1.7.0-openjdk-devel

Install icedtea for the Java browser plugin.

yum install -y icedtea-web

2. Oracle JDK

In some cases - such as developing JavaFX applications - you may need to install Oracle JDK. The following instructions are taken from this guide and refer it for details.

First of all, download the appropriate rpm package from (jdk-7u10-linux-i586.rpm, jdk-7u10-linux-x64.rpm, jre-7u10-linux-i586.rpm or jre-7u10-linux-x64.rpm). Now, open a terminal and do the following.

Change to root user.

sudo -i
## OR ##
su -

Install Java JDK or JRE package

## JDK 32-bit ##
rpm -Uvh /path/to/binary/jdk-7u10-linux-i586.rpm

## JDK 64-bit ##
rpm -Uvh /path/to/binary/jdk-7u10-linux-x64.rpm

## JRE 32-bit ##
rpm -Uvh /path/to/binary/jre-7u10-linux-i586.rpm

## JRE 64-bit ##
rpm -Uvh /path/to/binary/jre-7u10-linux-x64.rpm

Install Sun/Oracle JDK java, javaws, (for Firefox/Mozilla) and javac with alternatives –install command

## java ##
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
## javaws ##
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000

## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/ /usr/java/latest/jre/lib/i386/ 20000

## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/jre/lib/amd64/ 20000

## Install javac only if you installed JDK (Java Development Kit) package ##
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000

Check current java, javac, javaws and versions

java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)

Java(TM) Web Start

javac -version
javac 1.7.0_10
edit flag offensive delete link more

answered 2013-01-08 15:52:50 -0600

davidva gravatar image

Open Source

yum -y install java icedtea-web

Please search before asking, google is you best friend.

edit flag offensive delete link more


Thank you, this works for me.

tuyennguyencanada gravatar imagetuyennguyencanada ( 2013-06-20 18:10:12 -0600 )edit

Question Tools



Asked: 2013-01-08 15:05:43 -0600

Seen: 51,146 times

Last updated: Jan 09 '13