title: Java webstart max-heap-size causes JVM cannot be started
body: <p>We use java webstart on the client side for a java swing based aplication. Recently we have been experiencing a weird "Cannot start java Virtual machine " error when clicking in the jnlp link. </p>
  
  <p>We soon find out its because the max-heap-size setting in the jnlp file was set to 1024m whereas most of the clients PC only have 1 gb physical memory. Set the max-heap-size back to 512m solved the problem.
  Currently, the relevant line in the jnlp file looks like</p>
  
  <pre><code> &lt;j2se version="1.5+" initial-heap-size="100m" max-heap-size="512m"/&gt;
  </code></pre>
  
  <p>I looked into the jnlp spec, but cannot find anything related to the "Java Virtual machine" issue. In theory the max-heap-size should not matter as much as the initial-heap-size. But our experience suggested quite the contrary.</p>
  
  <p>The client environment: </p>
  
  <p>Windows XP SP2 ( 32bit ), Internet Explorer 8.06, Memory 1G
  Note max-heap-size set to 1024m can cause the same problem on a machine with 2G ram. </p>
  
  <p>Basically, what I am looking for here is some reference/spec/experience about why this is happening, and if there is any get-round for this issue besides increasing the physical memory size. </p>
  
  <p>Another thing is that if we leave the max-heap-size unspecified, will the actual physical memory size be used as the max-heap-size, or a system-default one will be used?</p>
  
  <p>Thanks,
  JasonW</p>