MEGAN.vmoptions is great, but it applies globally for all MEGAN instances. Seeing that MEGAN is a shell script, there is a shell variable
$INSTALL4J_ADD_VM_OPTIONS which can be used to set vm options on the command line. However, the way it is setup now is that the
MEGAN.vmoptions are appended such that java respects only the global
-Xmx value. It would be great if it were prepended instead.