You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Matthew Heaton <Ma...@apexlearning.com> on 2000/12/15 20:13:14 UTC

Ant cannot find compiler

I'm running ant on Win NT with Suns JDK 1.3, and had been successfully
running it for a number of weeks.  All of a sudden I started getting errors
and I don't remember changing any settings on my machine.

When I tried compiling java classes through ant I got the following error.

    [javac] Modern compiler is not available - using classic compiler

BUILD FAILED

C:\ace\build.xml:60: Cannot use classic compiler, as it is not available


My JAVA_HOME was set to c:\jdk1.3\jre and that had been working.  Then I
tried setting it to just c:\jdk1.3 and it compiled but Javadoc failed with
the following error:

Running javadoc...
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Error: could not open `c:\jdk1.3\lib\jvm.cfg'


I've tried everything I can think of an no solution.

-Matt

Re: Multi-target builds

Posted by Peter Donald <do...@apache.org>.
At 12:31  15/12/00 -0700, James Bucanek wrote:
>Greetings,
>
>I just started working with Ant this week, and have run across a 
>potential annoyance.
>
>It appears that Ant only builds one target at a time.  So when 
>building multiple targets, Ant builds each target successively.  The 
>result being that any common targets are executed multiple times.
>
>I've found a hack around this:
>
>     <target name="init" unless="init.complete">
>         <echo message="init executing..."/>
>         <tstamp/>
>         <property name="init.complete" value="true"/>
>     </target>
>
>So, is there some other way of either (a) keeping tasks from running 
>more than once or (b) building the entire tree of targets to be built 
>in one pass?

The only real way to do it is to add another target to project that lists
all targets you want to run in depends tag.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: Ant cannot find compiler

Posted by Stefan Schmitt <ss...@raleigh.ibm.com>.
Which version of Ant do you use?

Yours 
Stefan S


Multi-target builds

Posted by James Bucanek <su...@gloaming.com>.
Greetings,

I just started working with Ant this week, and have run across a 
potential annoyance.

It appears that Ant only builds one target at a time.  So when 
building multiple targets, Ant builds each target successively.  The 
result being that any common targets are executed multiple times.

I've found a hack around this:

     <target name="init" unless="init.complete">
         <echo message="init executing..."/>
         <tstamp/>
         <property name="init.complete" value="true"/>
     </target>

So, is there some other way of either (a) keeping tasks from running 
more than once or (b) building the entire tree of targets to be built 
in one pass?

Thanks,

__________________________________
James Bucanek
<ma...@gloaming.com>