Default maximum heap size -- Ubuntu 10.04 LTS, openjdk6-jre

Posted by sachin on Super User See other posts from Super User or by sachin
Published on 2011-01-08T20:04:33Z Indexed on 2011/01/08 20:56 UTC
Read the original article Hit count: 187

I just installed openjdk6-jre on Ubuntu 10.04

java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu1~10.04.1) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Every time I run "java" I get this error:

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

This can be solved by specifying a maximum heap size and running

"java -Xmx256m"

But is there anyway to permanently fix this error (i.e. set the default heap size to 256MB so that I do not need to specify the max heap size every time I run the command)

© Super User or respective owner

Related posts about ubuntu-10.04

Related posts about memory-limit