[fedora-java] Eclipse 3.2M5 and ant.java.version

Andrew Overholt overholt at redhat.com
Sun Feb 19 16:03:08 UTC 2006


Hi,

I attempted to build $subj yesterday but ran into a snag with their new 1.5
stuff in org.eclipse.jdt.apt (Annotation Processing Tools).  We'll have to
work with the Eclipse releng team to get some conditional compilation and
inclusion of apt set up instead of the current "don't build if not using a
1.5 JDK".

In the meantime, however, I found an issue with libcj and ant.java.version.

ant.java.version is the property that the Eclipse uses to determine what
JVM/JDK is being used.  It is implemented like this [1]:

            Class.forName("java.lang.Readable");
            javaVersion = JAVA_1_5;

and if we look in libgcj:

$ unzip -l /usr/share/java/libgcj-4.1.0.jar | grep java.lang.Readable
      197  02-06-06 03:44   java/lang/Readable.class

So with a simple test.xml [2], we get:

     [echo] java.version is 1.5

Is there a way we can get around this without patching ant or removing the
1.5 class library stuff from libgcj?

Andrew

[1]
http://svn.apache.org/viewcvs.cgi/ant/core/trunk/src/main/org/apache/tools/ant/util/JavaEnvUtils.java?view=markup
(line 102)

[2]
<project name=" Test" default="run" basedir=".">
<target name="run">
                <echo message="java.version is ${ant.java.version}" />
</target>
</project>




More information about the fedora-devel-java-list mailing list