Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not create the Java Virtual Machine" when increasing the -Xmx

Tags:

java

eclipse

The eclipse on my work computer was working with VM argument -Xms40m and -Xmx512m and it is really slow and freezes a lot, I wanted to increase it to -Xmx1024m, but every time I did so I got the error "Could not create the Java Virtual Machine".

The computer has 3.5GB RAM, WIN XP (32-bit), Java 1.6_18

What could be the reason? Is it related to other arguments?

UPDATE: I changed the -vm argument so it will use the jvm.dll that comes with the jrockit JDK and I was able to increase the max heap size to 1024m.

Also, on my home computer (WIN 7, 32-bit, 2GB RAM, java 1.7.0_21-b11), I was able to increase it 1024m as well.

like image 221
Bennyz Avatar asked Sep 12 '26 10:09

Bennyz


1 Answers

The maximum amount of memory available on Windows 32-bit processes is (generally speaking) 2GB. That includes everything for your JVM, not only the application heap. People report various numbers for the maximum heap that can use for a 32-bit JVM, but 1200m is a common figure. It seems to be lower for you. Best would be to switch to the 64-bit JVM, if you can.

Other questions:

  • How much memory can a 32 bit process access on a 64 bit operating system?
  • Java maximum memory on Windows XP
like image 151
Iulian Dragos Avatar answered Sep 13 '26 23:09

Iulian Dragos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!