Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to increase java Heap size ?

 
Sudha Ugendran
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have got an 'Out of memory Exception'while trying to build using ANT.Inorder to solve this isssue,I think I need to increase the heap size.
Can anyone tell me how to increase the heap size of JVM or let me know if there is any other way of resolving this issue?

Thanks in advance

Thanks& Regards,
Sudha
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use "-Xmx256m" to set the max memory size. "-Xmn256m" to set min memory size

If you enough memory in the machine, say 512 or above, then you can use aggressive heap. This can be used with jdk1.4 or above. So jvm will decide the heap size according to the free memory.

JAVA_OPTS="$JAVA_OPTS -XX:+AggressiveHeap"
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is "-Xms256m" instead of "-Xmn256m"
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All these Java settings are documented in the tooldocs section of the SDK documentation. Unless you are working with limited disk space you really should have those docs on your hard drive.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic