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 don't think you can do what you are trying to do; instead you'll have to ship instructions specific to your customers, their systems and their demands of how they can modify your .cmd file to allow for more memory.
Of course, if your product is aimed at very non-technical users, you may wish to hide this behind some more user-friendly config file. E.g.
# HIGH, MEDIUM, LOW - please change as appropriate. The guidelines are:
# * HIGH - users who generate 500 items per day
# * MEDIUM - 200-500 items etc
memoryUsage=MEDIUM
or possibly deploy different config files depending on which product option a user specifies when they order the product in the first place.