Java webstart max-heap-size causes JVM cannot be started

孤者浪人 提交于 2019-12-01 06:34:26

It is likely that this problem is caused by the fact that a sufficiently large memory area could not be allocated to your JVM. The Java object heap has to be allocated in contiguous virtual addresses, for implementation reasons.

I noticed that on a Win XP box with 2 Gb RAM this breaks at around 1.5 GB (this off course varies depending on what processes are running on each PC, so YMMV).

Checkout the following posts for some explanations:

Java maximum memory on Windows XP

Why is the maximum size of the Java heap fixed?

I found that both the initial-heap-size and max-heap-size were not well respected by the Mac version of javaws. I ended up replacing them with something like this:

      <j2se version="1.6+" java-vm-args="-Xmx1024m -Xms256m -Xss8m" />

And finally got it working on Mac with the larger heap size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!