aspose file tools*
The moose likes Java in General and the fly likes How to increase java Heap size ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to increase java Heap size ?" Watch "How to increase java Heap size ?" New topic
Author

How to increase java Heap size ?

Sudha Ugendran
Greenhorn

Joined: Oct 14, 2004
Posts: 9
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

Joined: Dec 29, 2004
Posts: 243
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

Joined: Dec 29, 2004
Posts: 243
I think it is "-Xms256m" instead of "-Xmn256m"
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to increase java Heap size ?