20080704 working with openjdk - plembo/onemoretech GitHub Wiki

title: Working with OpenJDK link: https://onemoretech.wordpress.com/2008/07/04/working-with-openjdk/ author: lembobro description: post_id: 493 created: 2008/07/04 17:23:22 created_gmt: 2008/07/04 17:23:22 comment_status: open post_name: working-with-openjdk status: publish post_type: post

Working with OpenJDK

The 1.6.0 beta version of the open source openjdk toolkit has now become a standard part of Fedora 9, and looks like it will replace java-1.4.2-gcj-compat-1.4.2 in the next major version of Red Hat Enterprise Linux. For now, java-1.6.0-openjdk-1.6.0.0-0.7.b08 and related packages, like java-1.6.0-openjdk-plugin-1.6.0.0-0.7.b08 and java-1.6.0-openjdk-devel-1.6.0.0-0.7.b08, are available from the Extra Packages for Enterprise Linux, or epel, repository for RHEL 4 and 5.

OpenJDK Logo

Because my home and work systems are built with CentOS 5.2 x86_64, I’ve decided to forego the processing and memory overhead associated with nspluginwrapper and run the stock i386 Firefox 3 package out of /opt/firefox.

Getting the openjdk plugin for i386 to install took a bit of dancing around, because under normal circumstances yum and the repository configuration will only let you load the i386 and x86_64 versions of packages under certain special circumstances, particularly where the main executable is installed to /usr/bin. In my case I first installed all the desired openjdk packages for x86_64, and then specifically told yum to install the base i386 package, java-1.6.0-openjdk-1.6.0.0-0.7.b08.i386. This dragged along the prereq giflib for i386. Then I downloaded and did a local install with an “rpm -ivh” of the plugin rpm for i386, since yum refused to do this over the wire, even after I’d removed the x86_64 version of the plugin and explicitly directed it to install java-1.6.0-openjdk-plugin-1.6.0.0-0.7.b08.i386.

So far both versions seem to be working nominally in the native browser for their architecture. It would definitely be nice if we could get more vendors to make browser plugins available for x86_64, but so far the developers of both Adobe Flash and Real Player haven’t stepped up to the plate (this isn’t entirely due to the usual corporate slovenliness often associated with closed-source projects, see the apologia by the developer of Flash for Linux here).

As for OpenJDK 1.6.0 as a development environment, so far all I’ve done is install the CentOS’s rebuild of Red Hat’s GTK version of eclipse, which works well enough (I built my first “Hello World!” class to test it).

UPDATE: Well, so far so good. I’ve been using openjdk on my home and work machines for a couple of days now and so far most Java apps have not realized the difference. The one exception is Runescape, the Massively Multiplayer Online Role-Playing Game that is currently the obsession of my two sons. The basic problem is that openjdk doesn’t yet support signed applets, and seems to have a problem creating the necessary on-disk cache Runescape needs to run, so I’ve had to resort to a “downgrade” to Sun’s commercial JDK 1.6 and plugin for i386 (Sun doesn’t provide an x86_64 plugin for the commercial JDK).

Copyright 2004-2019 Phil Lembo