ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Stirling" <sstirl...@mediaone.net>
Subject RE: Compiling Ant on Linux...classic/modern javac not detected.
Date Tue, 12 Dec 2000 10:00:43 GMT
Hmmm.  Well, this is what I did on RH Linux 7.0.  Not sure if it's going to
be any help:

-download latest CVS (I suggest doing this, since line 88 in my build.xml is
the closing </target> from the prepare target, but yours suggests that line
88 is somewhere in the compile target, which is close, but a little off.

-edit jakarta-ant/.ant.properties.sample to set build.compiler to modern
(this is where you should set the build.compiler, as opposed to editing
build.xml).  Also edit /path/to/junit.jar to compile all the optional tasks.

-cp jakarta-ant/.ant.properties.sample to ~/.ant.properties

-export JAVA_HOME=/path/to/jdk

-run ./bootstrap.sh

Reported build time with modern compiler and optional tasks: 29 secs.

I also tried it with build.compiler=jikes, which took 12 secs.

Also, just in case, try putting your /path/to/jdk/bin first in your PATH.

Scott


-----Original Message-----
From: David Elliot [mailto:jspboy@yahoo.co.uk]
Sent: Tuesday, December 12, 2000 1:49 AM
To: ant-user@jakarta.apache.org
Subject: RE: Compiling Ant on Linux...classic/modern javac not detected.


Hi Scott,

No, no Kaffe...I'm hoping to work it with a
1.3.0 jvm (Blackdown or IBM).

Anyway, at present java -version reports:

-----
Java(TM) 2 Runtime Environment, Standard Edition
(build Blackdown-1.3.0-FCS)
Java HotSpot(TM) Client VM (build Blackdown-1.3.0-FCS,
mixed mode)
-----

My shell environment for the Ant build is:

-----
BASH=/bin/bash
BASH_VERSION=1.14.7(1)
CLASSPATH=
JAKARTA_HOME=/opt/jakarta-home
JAVA_HOME=/usr/local/jdk1.3
LANG=en_US
PATH=/opt/jakarta-home/jakarta-ant/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/l
ocal/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/usr/X11R6/bi
n:/usr/local/jdk1.3/bin
-----

The output from running bootstrap.sh is:

-----
... Bootstrapping Ant Distribution
... Compiling Ant Classes
... Copying Required Files
... Building Ant Distribution
Searching for build.xml ...
Buildfile: /opt/jakarta-home/jakarta-ant/build.xml

clean:
   [delete] Deleting directory
/opt/jakarta-home/build/ant

prepare:
    [mkdir] Created dir: /opt/jakarta-home/build/ant

check_for_optional_packages:

compile:
    [mkdir] Created dir:
/opt/jakarta-home/build/ant/classes
    [javac] Compiling 120 source files to
/opt/jakarta-home/build/ant/classes

BUILD FAILED

/opt/jakarta-home/jakarta-ant/build.xml:88: Cannot use
classic compiler, as it is not available

Total time: 5 seconds
... Cleaning Up Build Directories
... Done Bootstrapping Ant
-----

It cannot find a classic compiler apparently...
I get the same error when trying Blackdown 1.3,
1.2.2 or IBM 1.1.8.  I have also tried changing
build.compiler in build.xml to 'modern' rather
than 'classic'...in which case the build reports:

-----
    [javac] Compiling 120 source files to
/opt/jakarta-home/build/ant/classes
    [javac] Modern compiler is not available - using
classic compiler

BUILD FAILED

/opt/jakarta-home/jakarta-ant/build.xml:88: Cannot use
classic compiler, as it is not available
-----

Is there any way to hardwire it so as to just
use the javac in the current path rather than
trying to do clever things ??

Many thanks for your help,

Dave Elliot


Mime
View raw message