Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java memory hogging

Status
Not open for further replies.

DellHater

Programmer
Nov 24, 2006
75
CZ
Hi,
First off I am a total novice as far as Java goes.
We are running a new product and are having a huge problem with it killing the RAM, yesterday mine topped out at 830 Meg.
We started by running the application directly but encountered problems with memory.
One of our resident 'geeks' amended a .bat file to run instead, adding the following line
"%JAVA_HOME%\bin\java.exe" -mx768m -classpath
I am guessing the -mx768m is something to do with max memory.
He originally set this to 512, then said up it to 768, but it still throws up a heap space problem.
I've got a memory optimizer on here, but it still trashes the PC. I am running with a gig of ram.
Anyone recommend anything ?
Obviously besides getting 2 gig of ram (simple fix but don't think our IS dept will do that for all 8 of us !

Thanks in advance

Steve
 
Soz mate, its an internal product. So can't divulge it.
Which I can't do anything about. Just wondered if there is a way to manage the java memory 'outside' the application you are running.......
 
As far as I'm aware you can only configure the heap available to the JVM using the -Xmx ( and -Xms for initial memory) command-line arguments. Your post is missing the capital X in the max setting. Maybe this is the problem.

BTW, If the application uses up all available heap memory and then bombs, there's something wrong with the application, I'd say.

Tim
 
Thanks, yes there is no X at the beginning of ms in the batch file to run the java, I will try that.
Otherwise I think its the application......... which I can't do bugger all about !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top