Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Increase Java Heap Size?

843829Apr 20 2006 — edited Apr 27 2006
Hi Dudes,
i used the below command to increase Java Heap Size
java -Xms 512m -Xmx 512m -Xss 512m, But it is not working.

I am using the below code to print the size:
System.out.println("MAX MEMORY = " + Runtime.getRuntime().maxMemory() / 1048576 + "MB");
System.out.println("TOTAL MEMORY = " + Runtime.getRuntime().totalMemory() / 1048576 + "MB");
System.out.println("FREE MEMORY = " + Runtime.getRuntime().freeMemory() / 1048576 + "MB");

But it is displaying heap size as 63MB aven after increasing the heap size.

Can anyone please help me?????????????

Thanks
Syed
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2006
Added on Apr 20 2006
7 comments
680 views