wood burning stoves*
The moose likes Java in General and the fly likes setting -Xmx1024m on Java command? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "setting -Xmx1024m on Java command?" Watch "setting -Xmx1024m on Java command?" New topic
Author

setting -Xmx1024m on Java command?

medhaj hambi
Ranch Hand

Joined: Jun 04, 2008
Posts: 34
Hi...I have an application that runs out of memory frequently. I have learnt that we can use this so that that error may not occur. Can anyone tell me how to set
that particular variable permanantly...unlike just doing it run time. The reason why I was asking is...I am having an application that uses Java compiler and I donot know the reason but, I see that the program runs out of memory. So, I want to set this value permanantly as I donot use the command line option for that. I am using a particular tool.
That will be great if someone could shed some light on this.

Thanks,
-V
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36453
    
  15
Probably better to find out why your application is running out of memory.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And use a batch/shell program to run the program with that argument until you do.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting -Xmx1024m on Java command?
 
Similar Threads
Unsatisfied Link error
is it possible to process a 500MB zipfile in java?
Out of Memory with high Free Memory
Java out of memory exception
error because of classpath?