Updating the java.version property reported by IcedTea

Mark Wielaard mark at klomp.org
Wed Dec 2 00:34:08 PST 2009

Hi Deepak,

On Tue, 2009-12-01 at 16:35 -0500, Deepak Bhole wrote: 
> Currently, IcedTea reports java.version to be 1.6.0_0
> Applets can sometimes rely on it. For example, this one:
> http://www.java.com/en/download/help/testvm.xml
> Right now, that applet fails as
> 'java.lang.StringIndexOutOfBoundsException: String index out of range: 8'

Sigh. That applet is pretty bad. Last time we changed the java.version
string it was also because that one made some bogus assumptions.

2008-06-11  Lillian Angel  <langel at redhat.com>

  * Makefile.am: Added JDK_UPDATE_VERSION to environment. Some applets,
  like the Sun's verify Java version applet, check for the "_" in the
  version string. Our version string format is now correct:
  java version "1.6.0_0"
  OpenJDK  Runtime Environment (build 1.6.0_0-b10)
  OpenJDK Server VM (build 1.6.0_0-b10, mixed mode)
  * Makefile.in: Regenerated.

They must have changed it since then. Is the source code available?

> If I force java.version to be 1.6.0_16, it works fine. (1.6.0_16 is 8 in
> length).
> What do others think about making IcedTea report 1.6.0_16 to match the update
> number? If that is not possible, I can just make the plugin report it,
> but it'd be nice to have the system itself do the right thing.

If we have to have a "real" update number it would be nice to base it on
the actual icedtea version number. What about if we take the significant
numbers of the icedtea package version (without the dots and extensions
pre/rc/etc)? You would have to do something like the following to change
the definition in Makefile.am:

+JDK_UPDATE_VERSION = $(shell echo $(PACKAGE_VERSION) | sed -e "s/[a-z.]//g")

That would be 17 for current hg tip. And that makes the update version
nicely increase with each release.

> I would really like to see that applet working because it is a sort of
> test for plugin installation, and if it fails, people assume that the
> plugin is broken when it is not.

Yeah, agreed. Although it really is that applet that is totally
brain-dead and broken :{

Should we have our own "Hello World" applet somewhere we can point
people to to check out whether things work appropriately somewhere on



More information about the distro-pkg-dev mailing list