I was just contacted concerning this Java memory problem, here is how you can get rid of it.
The amount of Ram for an Java application is limited by the JVM. To provide more memory to a single application you can start your Java process with two more parameters, like:
This allows Java to use up to 1024 MB. Here
-Xms specifies the initial heap size, while
-Xmx determines the maximum size.
For machines with much more mem you might use
g instead of
m to set the size in gig’s. So
-Xmx10g limits the amount of RAM to 10 GB.
Of course it’s annoying to apply these parameters to all your Java runs, so to change this behavior user-wide, you may create an alias like:
or better: Tell it to the Java Plugin Control Panel!
Using XFCE you can find this tool in your panel’s menu in the Settings section. Gnome users may look in System > Preferences. If you don’t want to move your mouse you can also run
ControlPanel from your terminal.
This opens a window, default parameters can be applied in the tab Java, click View… and add your parameters to the Runtime Parameters column. This tool afterwards writes something like the following line to
So advanced users craving for trouble may edit this file on it’s own :-P