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

Andrew Haley aph at redhat.com
Sun Feb 19 16:14:59 UTC 2006


Andrew Overholt writes:
 > 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?

Suggest we patch ant to use System.getProperty("java.version") and
push that patch upstream.

Andrew.




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