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!

no responses for Java Virtual Machine Options

    Leave a Reply

    Your email address will not be published. Required fields are marked *