Sun Java

From OLPC
Revision as of 00:02, 9 July 2010 by Wad (talk | contribs) (Install Procedure)
Jump to: navigation, search

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

Candidates

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.

Caveats

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: http://java.sun.com/javase/downloads/index.jsp 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.

Now we have to tell Fedora to use the Sun JRE instead of OpenJDK and install it into the browsers:

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

Removal

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

# /usr/sbin/alternatives --config java
# /usr/sbin/alternatives --config libjavaplugin.so