0

A client has java heap space problems. His environment seems to limit max heap space to 300 MB. My application should work with that, although it consumes more if it can. That's why I tried to limit the heap space by parameter to verify my claim. It is a webstart application, why I run from the console:

javaws -J-Xmx300m http://localhost:8080/application

However the according javaw process is using 400 MB of RAM. Is there something wrong with the parameter or can't that be used to really limit the heap space?

jan
  • 2,741
  • 4
  • 35
  • 56
  • 1
    JVM sometimes consumes more heap memory than what you have allocated. CHeck this http://stackoverflow.com/questions/22871321/is-it-possible-for-a-java-memory-leak-to-use-more-memory-than-the-heap-permgen – Jay Apr 28 '14 at 10:32
  • I believe you can specify that in the jnlp file. – anonymous Apr 28 '14 at 10:32
  • [Web Start Tutorial: Structure of the JNLP File](http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/jnlpFileSyntax.html), search for "java-vm-args", "max-heap-size". – Oleg Estekhin Apr 28 '14 at 11:05
  • @OlegEstekhin and anonymous: Have you checked this behaves different? In my understanding this parameters will simply be used exactly as my direct version for javaws. – jan Apr 28 '14 at 11:26

1 Answers1

0

The parameter is working correctly, but as stated by @Jay the RAM usage is the sum of more as the heap space. See the linked question.

Community
  • 1
  • 1
jan
  • 2,741
  • 4
  • 35
  • 56