开发者

increasing heap size in java program gives problem

i am using a java program which requires a lot of ram. ( Ideally i would want to give it

10 GB of ram )

this program is run using a bat file. which开发者_Go百科 has the following command to set java heap size

java  -Xmx896m weka.gui.explorer.Explorer

which allocates it 896 MB.

I am running this program on a high end 64bit server with windows 2003 64bit standard OS.

when i try to change the bat file to increase heap size to lets say 1.8 GB by using

java  -Xmx1896m weka.gui.explorer.Explorer

it gives an error message - "Could not reserve enough space for object heap " and the program doesnt start

how can i give this program a greater heap size atleast upto 4 GB


Did you try using -d64 to specify JVM to use 64 bit version?

java -d64 -Xmx2g weka.gui.explorer.Explorer

Just for information, that error should raise when JVM is trying to call mmap function to obtain the address space for the heap from operating system with an invalid size.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜