ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: JavaCC task on Ant 1.6beta2 within IntelliJ not working
Date Tue, 11 Nov 2003 15:36:36 GMT
On Tue, 11 Nov 2003, Fabian Gonzalez <fabgo@yahoo.com> wrote:

> Could not find a path to JavaCC.zip from
> 'd:\java\javacc3-2'.

Not the nicest of error messages - but then again that's not what
1.6beta2 is supposed to say.  I'd bet you are not using the version of
Ant you think you do within IDEA.

1.6beta2 would say 

"Could not find a path to JavaCC.zip or javacc.jar from '" + home + "'."

> If I put the JavaCC.zip distribution there,

No, unpack your distribution there (and make sure you really use
1.6beta as 1.5.x won't know about JavaCC 3.2).

> the following error message appears:
> 
> java.lang.NoClassDefFoundError:
> COM/sun/labs/javacc/Main
> 
> Which leads me to believe that Ant somehow doesn't
> detect that the JavaCC version I have installed is the
> most recent version.

1.6beta uses the (clumsy) algoritm:

if javcchome/JavaCC.zip exists then
  this is JavaCC 1.x, use COM.sun.labs.javacc.Main
else if javcchome/bin/lib/JavaCC.zip exists then
  this is JavaCC 2.x, use COM.sun.labs.javacc.Main
else if javcchome/bin/lib/javacc.jar [*] exists then
  read archive
  if it contains org.netbeans.javacc package then
    this is JavaCC 3.0, use org.netbeans.javacc.parser.Main
  else
    this is JavaCC 3.x with x > 0, use org.javacc.parser.Main
  endif
else
  throw exception
endif

Stefan

[*] Actually I've cheated, it will also accept javacchome/javacc.jar.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message