From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.2) Gecko/20040809 Epiphany/1.3.8 Description of problem: Version-Release number of selected component (if applicable): ant-1.5.2-30 How reproducible: Always Steps to Reproduce: Try to use classic-ant and a build.xml to build a Java project. Actual Results: [mike@imp hw1]$ classic-ant Warning: JAVA_HOME environment variable is not set (or not exported). If build fails because sun.* classes could not be found you will need to set the JAVA_HOME environment variable to the installation directory of java. libgcj-java-placeholder.sh This script is a placeholder for the /usr/bin/java master link required by jpackage.org conventions. libgcj's rmiregistry, rmic and jar tools are now slave symlinks to these masters, and are managed by the alternatives(8) system. This change was necessary because the rmiregistry, rmic and jar tools installed by previous versions of libgcj conflicted with symlinks installed by jpackage.org JVM packages. Buildfile: build.xml /usr/bin/classic-ant: line 195: 20522 Aborted "$JAVACMD" $ANT_OPTS -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" org.apache.tools.ant.Main $ANT_ARGS "$@" Additional info:
Created attachment 103769 [details] Backtrace of gij abort following execution of gij by classic-ant
Created attachment 103770 [details] The build.xml used
Created attachment 104361 [details] Like classic-ant, the natively compiled ant causes ecj to fail. This is the output ant gives.
Don't know if related: I'm trying to compile an application using ant. Installed jdk 1.5.0 from sun, set JAVA_HOME and replaced /etc/alternatives: [root@marte alternatives]# l j* lrwxrwxrwx 1 root root 26 Oct 3 15:38 jar - > /usr/java/jdk1.5.0/bin/jar lrwxrwxrwx 1 root root 27 Oct 3 15:38 java - > /usr/java/jdk1.5.0/bin/java lrwxrwxrwx 1 root root 28 Oct 3 15:38 javac - > /usr/java/jdk1.5.0/bin/javac lrwxrwxrwx 1 root root 30 Oct 3 15:38 javadoc - > /usr/java/jdk1.5.0/bin/javadoc lrwxrwxrwx 1 root root 28 Oct 3 15:38 javah - > /usr/java/jdk1.5.0/bin/javah Also set JAVA_HOME in /etc/ant.conf However, ant insists on using ecj although it's not referenced in build.xml: Apache Ant version 1.5.2 compiled on June 23 2004 Buildfile: build.xml Detected Java version: 1.4 in: /usr Detected OS: Linux file:/my/deja_vu/2compile/ofbiz/base/build.xml:83: Error starting ecj compiler Using classic-ant works. Is this correct? It doesn't seem correct to me hardcoding ecj.
This looks fixed in recent versions. I am using ant-1.6.1-1jpp_6fc and gcc-java-3.4.3-2. I also replaced JPackage's classpathx-jaxp with xerces-j2. This may have been what got this to work. Thanks!