We use client side java webstart to use java swing. Recently, we encountered an unusual error "Unable to start the Java virtual machine" when clicking on the jnlp link.
Soon we will find out about this because the max-heap-size parameter in the jnlp file was set to 1024 m, while most PC clients have only 1 GB of physical memory. Set the maximum heap size to 512 m, solving the problem. Currently, the corresponding line in the jnlp file looks like
<j2se version="1.5+" initial-heap-size="100m" max-heap-size="512m"/>
I looked through the jnlp specification, but I can not find anything related to the "Java Virtual Machine" problem. Theoretically, the size of the max heap should not matter as the size of the initial heap. But our experience has shown the exact opposite.
Client Environment:
Windows XP SP2 (32 bit), Internet Explorer 8.06, Memory 1G Note. The maximum heap size set to 1024 m can cause the same problem on a 2 GB machine.
Basically, I'm looking for some link / specification / experience here about why this happens, and if there are any problems with this issue, besides increasing the physical memory size.
Another thing is that if we do not specify the max-heap-size size, will the actual physical memory size be used as the maximum heap size, or will the default system be used?
Thanks, JasonW
source share