We ship a Java application whose memory demand can vary quite a lot depending on the size of the data it is processing. If you don\'t set the max VM (virtual memory) size
I think you're out of luck :-( The -Xms
and -Xmx
options don't provide that flexibility.
So I think you will need to wrap your JVM invocation with a script that can determine the maximum amount of memory, and then set -Xmx
appropriately (probably a .vbs script using WMI on Windows). Or perhaps it asks the users the first time it's run ?
A bit of a pain, I fear.