OpenJDK

From openSUSE


Contents

Background

The OpenJDK Project was born from Sun Microsystems' initiative to establish a free and open source code Java Development Kit. OpenJDK was originally based solely upon JDK 7.0, the next generation of the Java SE Platform (i.e. that which will become the Java SE 7). However, in early 2008, a second project was initiated to address the current JDK 6.0. Consequently, two separate OpenJDK projects now exist:

  • OpenJDK's JDK 7 Project, which is none other then the original OpenJDK project based upon the JDK 7.0 (Java SE 7 Platform). This project remains the main focus and site of new feature development [1]
  • OpenJDK's JDK 6 Project, which is the subsequently developed project that provides an open-source implementation of the older, yet still current, JDK 6.0 (Java SE 6 Platform) ... Note that this implementation is also sometimes referred to as OpenJDK6, and that it is this version which is found in the factory repo.

The IcedTeaproject was launched by Red Hat in face of some remaining licensing issues which prevent building OpenJDK with completely free software components. In essence, IcedTea is an unencumbered free implementation of Java based upon Sun's OpenJDK but with some parts from GNU Classpath. IcedTea is not a fork, but rather is meant as a stopgap solution with the end goal being a completely FOSS OpenJDK. Like OpenJDK, the IcedTea project has come about to provide two solutions:

  • IcedTea (version 1.7), which is the the original implementation based upon OpenJDK's JDK 7 (or, historically, simply just "OpenJDK") .... Note that this implementation is also sometimes referred to as IcedTea7, and that it is this version which is found in the factory repo
  • IcedTea6 (version 1.3), which is the later developed implementation based upon OpenJDK's JDK 6

Somewhat opposite of the OpenJDK project's development priorities, the IcedTea project now focuses its attention upon the "IcedTea6" implementation rather then on the original "IcedTea" implementation. Inferring from the information found on the IcedTea project's wiki, this decision seems to stem from the actual the status of the underlining JDKs (i.e. JDK 6.0 is the current release, while JDK 7.0 is still under development).

Stability of these two Java implementations

Although it happened to work out that OpenJDK6 was developed after IcedTea was first released, OpenJDK6 is much more mature and stable. This is a consequence of the fact that the former is based upon JDK 6.0/Java SE 6 whereas the later, IcedTea, derives itself from continuing developments of the yet unreleased JDK 7.0/Java SE 7.

How to install

A bundled version

The openjdk was included to openSUSE 11.0, so you can just type

# zypper install java-1_6_0-openjdk

or install it via Yast. There are six different packages:

  • java-1_6_0-openjdk - the runtime environment (JRE). Its necessary for running Java programs, like jedit, azureus, etc.
  • java-1_6_0-openjdk-plugin - the webplugin. Necessary for running applets from web browser (note, that Konqueror handles the applets in different way and it does not use the plugin). Is based on gcjwebplugin and does not support all of existing plugins.
  • java-1_6_0-openjdk-devel - the development kit (JDK). This is necessary for building of Java applications and also for JSP servlet containers, like Apache Tomcat.
  • java-1_6_0-openjdk-javadoc - a JavaDoc documentation of basic Java classes.
  • java-1_6_0-openjdk-src - source code of Java classes.
  • java-1_6_0-openjdk-demo - sources

The latest version from BuildService

OpenJDK binary packages are mainained in Java:openjdk6:Factory BuildService repository. If you would like to get a latest available version for openSUSE, just install an openjdk from that repository.

One-click install

The openjdk6 is now maintained in Java:openjdk6:Factory BS project and contains a latest available packages of openjdk. For installation, just click to one of following links.

openSUSE 11.0

openSUSE Factory

Note: Usage of this packages will not work in 10.3 and olders due to rpmlib(PayloadIsLzma) <= 4.4.2-1 is needed by ... - see PayloadIsLzma. You have to install a newest rpm

From console

# zypper ar http://download.opensuse.org/repositories/Java:/openjdk6:/Factory/openSUSE_11.0/ Java:openjdk6:Factory
# zypper in java-1_6_0-openjdk

Postinstall check of Java plugin

Restart Firefox and type about:plugins. You should see a string GCJ Web Browser Plugin (using IcedTea) 1.2 (for icedtea7 GCJ Web Browser Plugin (using IcedTea) 1.5). Then you can try one of the Demo Applets to test it.

If you got a problem (eg. application crash), please follow instruction in howto [Bugs:An_application_crashed] and type into the Bugzilla.

If you'd like to use another Java plugin, please read a Java/setDefaultJava#The_Java_plugin