Java Could not reserve enough space for object heap error

Kemal Tunca picture Kemal Tunca · Aug 4, 2013 · Viewed 328.1k times · Source

I have Java7 running on 32-bit Windows and 4 GB RAM, but:

java -Xmx4G -Xms4G -jar Minecraft.jar 
java -Xmx3G -Xms3G -jar Minecraft.jar 
java -Xmx2G -Xms2G -jar Minecraft.jar

...still does not work. Error:

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.

java -Xmx1G -Xms1G -jar Minecraft.jar is working. Why?

Answer

user3755563 picture user3755563 · Jun 25, 2014

Go to StartControl PanelSystemAdvanced system settingsadvanced(tab)Environment VariablesSystem VariablesNew:

Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M