Java Virtual Machine Options

Until I’ve tried to run java programs in low memory PCs, I always thought there’s always enough memory for Java Virtual Machines. This time, I’m with Java HotSpot Server VM, and it even fails to run simple

java -version

After consulting with Sun’s Java Hotspot VM Options Document and this, I added this option when launching JVM.

java -Xmx64m -version

That sets the maximum heap size for Java, and it works!

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a