Skip to Main Content

Java Programming

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!

java.lang.OutOfMemoryError: Java heap space error

priyapratheepJun 2 2008 — edited Jun 2 2008
Hi friends

I am getting java.lang.OutOfMemoryError: Java heap space error.I read the many threads regarding this
System.out.println("Java memory in use = " + ((Runtime.getRuntime().totalMemory()) - (Runtime.getRuntime().freeMemory())));
at the begining of the program i got
Java memory in use = 10939448

at the end of program i got
Java memory in use = 44747512

-Xms512m -Xmx512m ble bla ......

Please help me to sort out my problem

thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2008
Added on Jun 2 2008
8 comments
725 views