Ant itself is compiled correctly. I'm using both java6 and java5 from Sun, using "alternatives", and it works fine. The problem is with some libs included in Debian version. As a workaround, I commented out this code:
# Add the Xerces 2 XML parser in the Debian version
#if [ -z "$LOCALCLASSPATH" ] ; then
# LOCALCLASSPATH="/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar"
#else
# LOCALCLASSPATH="/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar:$LOCALCLASSPATH"
#fi
These are the jars which are incompatible with Java 1.5.x (JRE included, not only JDK). I commented this out and my builds are now working again.
Ant itself is compiled correctly. I'm using both java6 and java5 from Sun, using "alternatives", and it works fine. The problem is with some libs included in Debian version. As a workaround, I commented out this code:
# Add the Xerces 2 XML parser in the Debian version "/usr/share/ java/xmlParserA PIs.jar: /usr/share/ java/xercesImpl .jar" "/usr/share/ java/xmlParserA PIs.jar: /usr/share/ java/xercesImpl .jar:$LOCALCLAS SPATH"
#if [ -z "$LOCALCLASSPATH" ] ; then
# LOCALCLASSPATH=
#else
# LOCALCLASSPATH=
#fi
These are the jars which are incompatible with Java 1.5.x (JRE included, not only JDK). I commented this out and my builds are now working again.