Mailing List Archive

JavaCC, ant
I tried to build lucene 1.2-rc4, installed ant 1.4
and JavaCC2_1. I edited build.properties to reflect the name of
the JavaCC2_1.zip (it was JavaCC.zip before).


But it looks like not much is happening.
All I get is this:
Buildfile: build.xml

init:

javacc_check:
[echo]
##################################################################
JavaCC not found.
JavaCC Home: /javacc2.1/bin
JavaCC Zip: /javacc2.1/bin/lib/JavaCC2_1.zip

Please download and install JavaCC 2.0 from:

<http://www.webgain.com/products/java_cc/>

Then, create a .ant.properties file either in your home
directory, or within the Lucene directory and set the javacc.home
property to the path where JavaCC.zip is located. For example,
if you installed JavaCC in /usr/local/java/javacc2.0, then set the
javacc.home property to:

javacc.home=/usr/local/java/javacc2.0/bin/lib

If you get an error like the one below, then you have not installed
things correctly. Please check all your paths and try again.

java.lang.NoClassDefFoundError: COM/sun/labs/javacc/Main
##################################################################


compile:

jar:

BUILD SUCCESSFUL

Total time: 0 seconds

But I'd guess it should be doing a bit more than that.
Anyway, no java file seems to get compiled.

--
Chris Christoph P. U. Kukulies kukulies@rwth-aachen.de

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: JavaCC, ant [ In reply to ]
Hi Cristoph !

I successfully built lucene 1.2-rc4 from source this week. I'm wondering have
you installed JavaCC?

After downloading the JavaCC2_1.zip, unzip it and run the JavaCC2_1.class
classfile that will have been unpacked. This runs the JavaCC installer.

I installed into /usr/local so my top-level JavaCC directory is
/usr/local/javacc2.1.

My build.properties file looks like this:

# Home directory of JavaCC
javacc.home = /usr/local/javacc2.1
javacc.zip.dir = ${javacc.home}/bin/lib
javacc.zip = ${javacc.zip.dir}/JavaCC.zip

You may also want to try running the examples provided with both Ant and
JavaCC to verify that these tools have been installed successfully.

Cheers,
Adam

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: JavaCC, ant [ In reply to ]
On Tue, Apr 16, 2002 at 06:38:04AM +1200, Adam Ratcliffe wrote:
> Hi Cristoph !


Arghh! Silly me. I didn't know that I had to run the class as an installer.
Now it worked. Even the latest build:

>
> I successfully built lucene 1.2-rc4 from source this week. I'm wondering have
> you installed JavaCC?
>
> After downloading the JavaCC2_1.zip, unzip it and run the JavaCC2_1.class
> classfile that will have been unpacked. This runs the JavaCC installer.
>
> I installed into /usr/local so my top-level JavaCC directory is
> /usr/local/javacc2.1.

I'm using (urged to use) Windows 2000.
Coudl you have a glance at this: Is everything ok?

Buildfile: build.xml

init:
[mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin
[mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin\classes
[mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin\src

javacc_check:

compile:
[mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin\src\org\apache\lucene\analysis\standard
[javacc] Java Compiler Compiler Version 2.1 (Parser Generator)
[javacc] Copyright (c) 1996-2001 Sun Microsystems, Inc.
[javacc] Copyright (c) 1997-2001 WebGain, Inc.
[javacc] (type "javacc" with no arguments for help)
[javacc] Reading from file C:\lucene-1.2\jakarta-lucene\src\java\org\apache\lucene\analysis\standard\StandardTokenizer.jj . . .
[javacc] File "TokenMgrError.java" does not exist. Will create one.
[javacc] File "ParseException.java" does not exist. Will create one.
[javacc] File "Token.java" does not exist. Will create one.
[javacc] File "CharStream.java" does not exist. Will create one.
[javacc] Parser generated successfully.
[delete] Deleting: C:\lucene-1.2\jakarta-lucene\bin\src\org\apache\lucene\analysis\standard\ParseException.java
[mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin\src\org\apache\lucene\queryParser
[javacc] Java Compiler Compiler Version 2.1 (Parser Generator)
[javacc] Copyright (c) 1996-2001 Sun Microsystems, Inc.
[javacc] Copyright (c) 1997-2001 WebGain, Inc.
[javacc] (type "javacc" with no arguments for help)
[javacc] Reading from file C:\lucene-1.2\jakarta-lucene\src\java\org\apache\lucene\queryParser\QueryParser.jj . . .
[javacc] File "TokenMgrError.java" does not exist. Will create one.
[javacc] File "ParseException.java" does not exist. Will create one.
[javacc] File "Token.java" does not exist. Will create one.
[javacc] File "CharStream.java" does not exist. Will create one.
[javacc] Parser generated successfully.
[javac] Compiling 108 source files to C:\lucene-1.2\jakarta-lucene\bin\classes

jar:
[jar] Building jar: C:\lucene-1.2\jakarta-lucene\bin\lucene-1.2-rc5-dev.jar

BUILD SUCCESSFUL

Total time: 6 seconds



My build.properties was:

javacc.home=/javacc2.1/bin
(It worked nonetheless unless you tell me that the above build went wrong)

>
> My build.properties file looks like this:
>
> # Home directory of JavaCC
> javacc.home = /usr/local/javacc2.1
> javacc.zip.dir = ${javacc.home}/bin/lib
> javacc.zip = ${javacc.zip.dir}/JavaCC.zip
>
> You may also want to try running the examples provided with both Ant and
> JavaCC to verify that these tools have been installed successfully.
>
> Cheers,
> Adam
>
> --
> To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>

--
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: JavaCC, ant [ In reply to ]
Hi Cristoph !

If the build messages indicate a successful build you're probably there. Put
the jar C:\lucene-1.2\jakarta-lucene\bin\lucene-1.2-rc5-dev.jar on your
classpath and run the demos against that, that will tell you if you're done.

You can also check to see if JavaCC successfully compiled the grammar file
.jj to a .java file by checking the directory:

<lucene-install-dir>lucene-1.2-rc4-src/bin/classes/org/apache/lucene/queryParser

Cheers,
Adam

On Tue, 16 Apr 2002 07:19, you wrote:
> On Tue, Apr 16, 2002 at 06:38:04AM +1200, Adam Ratcliffe wrote:
> > Hi Cristoph !
>
> Arghh! Silly me. I didn't know that I had to run the class as an installer.
>
> Now it worked. Even the latest build:
> > I successfully built lucene 1.2-rc4 from source this week. I'm wondering
> > have you installed JavaCC?
> >
> > After downloading the JavaCC2_1.zip, unzip it and run the JavaCC2_1.class
> > classfile that will have been unpacked. This runs the JavaCC installer.
> >
> > I installed into /usr/local so my top-level JavaCC directory is
> > /usr/local/javacc2.1.
>
> I'm using (urged to use) Windows 2000.
> Coudl you have a glance at this: Is everything ok?
>
> Buildfile: build.xml
>
> init:
> [mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin
> [mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin\classes
> [mkdir] Created dir: C:\lucene-1.2\jakarta-lucene\bin\src
>
> javacc_check:
>
> compile:
> [mkdir] Created dir:
> C:\lucene-1.2\jakarta-lucene\bin\src\org\apache\lucene\analysis\standard
> [javacc] Java Compiler Compiler Version 2.1 (Parser Generator)
> [javacc] Copyright (c) 1996-2001 Sun Microsystems, Inc.
> [javacc] Copyright (c) 1997-2001 WebGain, Inc.
> [javacc] (type "javacc" with no arguments for help)
> [javacc] Reading from file
> C:\lucene-1.2\jakarta-lucene\src\java\org\apache\lucene\analysis\standard\S
>tandardTokenizer.jj . . . [javacc] File "TokenMgrError.java" does not exist.
> Will create one. [javacc] File "ParseException.java" does not exist. Will
> create one. [javacc] File "Token.java" does not exist. Will create one.
> [javacc] File "CharStream.java" does not exist. Will create one.
> [javacc] Parser generated successfully.
> [delete] Deleting:
> C:\lucene-1.2\jakarta-lucene\bin\src\org\apache\lucene\analysis\standard\Pa
>rseException.java [mkdir] Created dir:
> C:\lucene-1.2\jakarta-lucene\bin\src\org\apache\lucene\queryParser [javacc]
> Java Compiler Compiler Version 2.1 (Parser Generator)
> [javacc] Copyright (c) 1996-2001 Sun Microsystems, Inc.
> [javacc] Copyright (c) 1997-2001 WebGain, Inc.
> [javacc] (type "javacc" with no arguments for help)
> [javacc] Reading from file
> C:\lucene-1.2\jakarta-lucene\src\java\org\apache\lucene\queryParser\QueryPa
>rser.jj . . . [javacc] File "TokenMgrError.java" does not exist. Will
> create one. [javacc] File "ParseException.java" does not exist. Will
> create one. [javacc] File "Token.java" does not exist. Will create one.
> [javacc] File "CharStream.java" does not exist. Will create one.
> [javacc] Parser generated successfully.
> [javac] Compiling 108 source files to
> C:\lucene-1.2\jakarta-lucene\bin\classes
>
> jar:
> [jar] Building jar:
> C:\lucene-1.2\jakarta-lucene\bin\lucene-1.2-rc5-dev.jar
>
> BUILD SUCCESSFUL
>
> Total time: 6 seconds
>
>
>
> My build.properties was:
>
> javacc.home=/javacc2.1/bin
> (It worked nonetheless unless you tell me that the above build went wrong)
>
> > My build.properties file looks like this:
> >
> > # Home directory of JavaCC
> > javacc.home = /usr/local/javacc2.1
> > javacc.zip.dir = ${javacc.home}/bin/lib
> > javacc.zip = ${javacc.zip.dir}/JavaCC.zip
> >
> > You may also want to try running the examples provided with both Ant and
> > JavaCC to verify that these tools have been installed successfully.
> >
> > Cheers,
> > Adam
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org> For additional
> > commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>