ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Zellner <johan...@zellner.org>
Subject Re: Again: Cannot use classic compiler, as it is not available
Date Sun, 26 Nov 2000 15:25:32 GMT
On Mon, Nov 27, 2000 at 01:40:47AM +1100, Peter Donald wrote:
> At 03:38  26/11/00 +0100, you wrote:
> >Hello,
> >
> >I'm using ant 1.2 / java1.3 as it comes with the latest Linux-debian-woody.
> >Unfortunately I get the following output:
> >
> >    build:
> >        [javac] Compiling 345 source files to
> /home/joze/tmp/svgtoolkit-20001010/classes
> >        [javac] Modern compiler is not available - using classic compiler
> >
> >    BUILD FAILED
> >
> >    ... build.xml:52: Cannot use classic compiler, as it is not available
> >
> >
> >reading thru the latest mails from this list I tried the suggestions
> >
> >    export JAVA_HOME=/usr/lib/j2sdk1.3/
> 
> Try 
> 
> export JAVA_HOME=/usr/lib/j2sdk1.3
> 
> (remove the last slash)
> 
> If that doesn't work - place an echo right before ant command is called and
> see what value of CLASSPATH/JAVA_HOME/ANT_HOME etc is right before calling
> ant. This will give you a hint to whats going wrong. If that doesn't help -
> send results of that + running ant with -verbose to the list and we will
> try to help ;)

thanks. I found it out myself: debian supplies a different ant script:

    #!/bin/sh

    # Add all JAR files in /usr/share/ant/lib/ to CLASSPATH
    LOCALCLASSPATH=`echo /usr/share/ant/lib/*.jar | tr ' ' ':'`

    if [ "$CLASSPATH" != "" ] ; then
      CLASSPATH=$CLASSPATH:$LOCALCLASSPATH
    else
      CLASSPATH=$LOCALCLASSPATH
    fi
    export CLASSPATH

    /usr/bin/java -Dant.home=/usr/share/ant org.apache.tools.ant.Main $@

This doesn't respect apparently JAVA_HOME. I modified this script
to add /usr/lib/j2sdk1.3/lib/tools.jar to CLASSPATH and then it
works fine.  I'll send a report to the maintainer of the debian
ant package. Sorry, as this was not a problem of ant.

-- 
   Johannes

Mime
View raw message