Sun Java

Jump to: navigation, search

This is a guide to installing the Sun Java Runtime Environment onto a Fedora 11 build for the XO.


Candidate laptops for following these directions are XO and XO-1.5 laptops running either the F11 for XO-1 or the F11 for 1.5 software builds.


This is not open source software. OpenJDK is the version that Fedora and OLPC officially recommend for installation.

Sun's Java Runtime Environment works with Firefox, but not with the Browser activity in Sugar.

Install Procedure

You will need to download the Java Runtime Environment from Sun: You want the Java SE Runtime Environment (JRE) for Linux on 32bit machines.

If you downloaded it on a computer other than the XO, place it on a USB key and insert it into the XO.

Open a terminal window on the XO, and become root. Then execute the jre install script:

$ su
# sh jre-6u18-linux-i586-rpm.bin

You will have to space through the license agreement and then type 'yes'. You should see the RPM being installed.

Selecting Sun Java

By default, Fedora is set up to work with OpenJDK. To tell Fedora to use the Sun JRE instead of OpenJDK and install it into the browsers, type:

# /usr/sbin/alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000
# /usr/sbin/alternatives --install /usr/lib/mozilla/plugins/ \ /usr/java/default/plugin/i386/ns7/ 20000

Note that this only has to be done once --- if you update to a newer version of the JRE, you don't need to do this again.


To tell Fedora to start using OpenJDK instead again, type:

# /usr/sbin/alternatives --config java
# /usr/sbin/alternatives --config