Langtools javac task target/source from in 1.11

Andrew John Hughes gnu_andrew at
Tue Aug 18 05:18:48 PDT 2009

2009/8/18 Michael Franz <mvfranz at>:
> I don't normally follow the openjdk mailing list, but I see this issue was
> found back on August 10 with b68.  Will IcedTea still plan on using target
> 5?  Or will it be bumping to target 6?
> On Tue, Aug 18, 2009 at 2:16 AM, Michael Franz <mvfranz at> wrote:
>> Hi,
>> I am building using JDK 1.5 as my default, but configured with JDK 6 (this
>> is on OS X).  When the langtools section of the build runs I get a Bad
>> version number in .class file when the custom task 'pcompile' executes.
>> This is because the classes for the task are compile for JDK 6, but then run
>> using JDK 5.  The file has been updated to specify
>> source/target as 5 (from 6) but these are not passed to the javac that
>> compiles the tools.  To fix this, either the compilation of the tool needs
>> to specify the target as 5 or the jvm used to execute the tool needs to be
>> the same one used for the rest of the build (in this case 6).
>> The command line calling ant is:
>> ant -Djdk.version=1.7.0_0 -Dfull.version='1.7.0_0-bsd-b66'
>> -Drelease=1.7.0_0 -Dbuild.number=b66 -Djavac.debug=true
>> -Ddebug.classfiles=true -Djavac.source=5
>> -Djavac.executable=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/bootstrap/jdk1.6.0/bin/javac
>> -Dbuild.dir=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/openjdk-ecj/build/bsd-i586/langtools/build
>> -Ddist.dir=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/openjdk-ecj/build/bsd-i586/langtools/dist
>> build
>> where boot.javac.home is JDK 6.
>> So, ant is fired up using JDK 5, but the javac tasks run JDK 6.  Is there
>> a way to run the custom tasks using a forked JVM?
>> Michael

IcedTea doesn't 'use' any particular target, the output you included
is from OpenJDK.  The builds I'm doing now (based on b69) already use
7 as target and version.

pcompile currently uses the default source/target options of the javac
used to build it.  I have a fix for this pending review:
So the problem is that the javac you use to build defaults to a
version the java that handles it can't use.  I suggest you fix Ant to
use the same JVM as OpenJDK uses to bootstrap.
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (

Support Free Java!
Contribute to GNU Classpath and the OpenJDK

PGP Key: 94EFD9D8 (
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

More information about the distro-pkg-dev mailing list