Java

From OLPC
Revision as of 11:03, 27 August 2008 by 74.232.46.19 (talk) (Installing OpenJDK Java)
Jump to: navigation, search

Overview

Java is currently not shipped by default. Only open source software is, and apparently open source versions are either not yet usable[1], or only just becoming usable in early 2008 [2].

While not shipped by default, people do install java. And governments may install it, along with other non-free software, in their versions of the distribution. It appears applets now work in the browser if java is installed.[3]

In preparing java for wider use, two challenges might be getting something appropriately sized for the olpc laptop (eg, efforts to make the jre less bloated, or using something like JavaSE), and integrating with the Gtk/C/Python infrastructure for collaboration, storage, etc.

But the basic bottleneck, on this as in most things OLPC, is shortage of people. The core team is focused on the core, and on each deadline. The community fills in the many opportunties that leaves. And it doesn't look like anyone is really pushing on Java yet.

But sometimes work is happening without the wiki being updated. So it might be worth writing the devel list, to create a less random guess at current state.

Perhaps what will happen is someone with some applets or a java program they care about will clean up the wiki instructions for installing java. Some country will decide to ship java, and people will create content bundles containing html and applets. Perhaps someone will ship a program compiled with gcj, and the libraries included in their own ~20MB space budget. Someone will bang on using jython for the sugar ui. And java will increasingly become an option.

People and groups who have worked on integrating Java with the OLPC XO

  • Java on the OLPC, Concord Consortium has worked on getting Java Web Start to work on the OLPC to enable deployment of it's open source science and math software frameworks and activities on the OLPC.
  • The OLPC and Java, Cay Horstmann (the author of Core Java) has a blog entry about his efforts to get Java working on the OLPC he bought through the Give One Get One program.

JNLP Handler

see JNLP Handler

Installing OpenJDK Java

The Restricted Formats page contains installation directions for the Sun Java distributions that are encumbered by non open source licenses.

OpenJDK is an effort by Sun Microsystems to release versions of Java which are and can be completely built using code under free and open source licenses. Working in conjunction with RedHat's IcedTea project, a fully open source bootstrap of Java 6.0 was first made available for Fedora 9. The first XO Linux distribution based on Fedora 9 will be 8.2.0. Current "Joyride" development builds leading up to the 8.2.0 release also are based on Fedora 9. Until 8.2.0 is released, in order to install openjdk, you must first obtain a developer key (Activation_and_Developer_Keys) and upgrade your XO to a Joyride or 8.2.0 release candidate (see Olpc-update).

To install OpenJDK (assuminng you are running an XO distribution based on Fedora 9 or later), open the Terminal activity and type:

 sudo yum -y install java-1.6.0-openjdk

and press Enter to install Java without installing the browser plugin. To install the plugin as well, you may instead use:

 sudo yum -y install java-1.6.0-openjdk-plugin

Note: The java openjdk plugin is currently working in the "Web" browser activity in 8.2.0 and Joyride builds (as of 2008-08-27). It may not work with the Firefox2 or Firefox3 activities.

Potentially interesting Java programs


Alternatives to Java on the laptop

See "Thin client" for the implications of a server based approach.

Dynamic Scripting

Learn more about "Jython" to create dynamic scripting environments under Java.

See also