Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After installing the latest Java 7 Development Kit (Java SE 7u11) on my Windows 7 Professional 32bit PC with 4Gb RAM, I noticed I can't allocate much memory for Tomcat.

Whereas these memory settings worked for Java Development Kit 6u38:

set JAVA_OPTS=-server -Xms978m -Xmx978m -XX:MaxPermSize=512m

...when run with jdk7, these settings cause the Tomcat launcher to exit with following error message:

Error occurred during initialization of VM

Could not reserve enough space for object heap

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

I tried lowering the Xms and Xmx settings, and apparently, it won't work with more than 512m:

set JAVA_OPTS=-server -Xms512m -Xmx512m -XX:MaxPermSize=512m

Yet, systeminfo |find "Available Physical Memory" tells me that I have 1200mb available memory.

Has anything changed w.r.t. memory management of Java 7, and does this mean that Java 7 can only work with lower amounts of memory?

Thanks for any advice,

Ron

share|improve this question

1 Answer 1

Two information that could help you, calculation the memory correctly:

  1. a 32 bit OS can't use more then 3GB RAM, even if there is more installed
  2. Although the memory is allocated for Java, it is "free" at the system info as long as java is not actively using it

If you also have any other java process running (e.g. eclipse?), you won't see the allocated memory of these processes, too.

share|improve this answer
    
Thanks for your suggestions. I was aware of the limited memory available. Still, the same memory settings that work with JDK-1.6 produce heapspace errors when Tomcat is launched with JDK-1.7. That's why I'm wondering if memory requirements / handling has changed between these Java versions. –  rvdb Jan 31 '13 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.