[antlr-interest] "java.lang.OutOfMemoryError: Java heap space" error message (newbie)

ali azimi aliaazimi at yahoo.com
Sun Jul 15 08:14:47 PDT 2007



Randall R Schulz <rschulz at sonic.net> wrote:    On Sunday 15 July 2007 07:33, ali azimi wrote:
> Hello,
>
> I am still not able to increase the heap space. I keep getting
> "java.lang.OutOfMemoryError: Java heap space" error message once I
> click on the debugger. I use the the command "java -Xms32m -Xmx512m
> org.antlr.Tool RFC3986.g" but then face the following error message:
> "Exception in thread "main"
> java.lang.NoClassDefFoundError:org/antlr/Tool". I use
> ANTLRWorks_1.0.201.
> Could you please suggest me an easy way of sorting this
> out(increasing the heap space). I will be very grateful.

You're not dealing with an out-of-memory condition. You're invoking the 
JVM without properly telling it where your ANTLR libraries (JAR files) 
are located.

Please show us the command you're using to attempt to launch ANTLRWorks 
with the -X options. 
   
  I do not use any commands to launch ANTLRWorks. I simply double-click on the jar file (ANTLRWorks_1.0.201.jar) which is located on my computer desktop. I use the command “java -Xms32m -Xmx512m org.antlr.Tool RFC3986.g “ in an attempt to increase the heap space.
   
   
  If it's literally the one you gave above:

java -Xms32m -Xmx512m org.antlr.Tool RFC3986.g

Then of course it won't work. You must include a -classpath ... 
or -cp ... option to tell Java where to find the ANTLR classes.

It appears nothing has changed since your last message on this topic.

I'll repeat this advice I gave you then:

On Friday 13 July 2007 09:24, Randall R Schulz wrote:
> How were you invoking ANTLR before? Some script? It will have the
> necessary class-path argument that you'll need to include.
>
> Alternately, you can just modify that script to have the heap limit
> options or to be able to accept such options on its command line.


> ...
> Al


Randall Schulz



 
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070715/ac726794/attachment.html 


More information about the antlr-interest mailing list