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

Heap size for JVM 1.6

Baiju Scariah
Ranch Hand

Joined: Mar 17, 2005
Posts: 33
Hello,

Can someone please let me know what is the default minimum and maximum heap size for JVM, if -Xms and –Xmx are not specified in Windows and Solaris environment?

I am using jre1.6 on Windows VISTA, XP environments

I am using jre1.6 on Solaris 10

Thanks,
Baiju S
Bob Wheeler
Ranch Hand

Joined: Apr 24, 2009
Posts: 317
Hi,
I can give you code to get your default and max heap size:


I hope that helps a little bit and I hope that's correct lol.
cheers
Bob


SCJP 6 - SCJD - SCWCD 5 - SCBCD 5
JavaEnterpriseEditionFaq - TomcatFaq
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

This question does not have anything to do with the SCJP exam. I will move it to a more appropriate forum for you.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ryan Anderson
Greenhorn

Joined: May 18, 2009
Posts: 21
in case anyone wanted to change there heap size @ runtime....

http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
You should find your ways round the official Java™ documentation: look for the java tool and also look for the "ergonomics" link. You see it appears to vary from computer to computer.
Baiju Scariah
Ranch Hand

Joined: Mar 17, 2005
Posts: 33
Thanks to all for the update.

But, I am interested in knowing is there a default value for -Xmx. In other words, if we don't specify anything at runtime, does java has any default value?

Thanks
Baiju S
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19544
    
  16

Yes - 64MB. Which you could have found by searching.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Baiju Scariah
Ranch Hand

Joined: Mar 17, 2005
Posts: 33
Thanks.

Somehow, my search wasn't successful...

Baiju
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3169
    
  10
Rob Prime wrote:Yes - 64MB. Which you could have found by searching.


Actually, since Java 1.5, that's no longer true in all cases. See the ergonomics link that Campbell posted.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Heap size for JVM 1.6
 
Similar Threads
error when deploying to WAS 4
Out of Memory Error
[18n]JFileChooser
Out Of Memory Error?
Java Heap Size