Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
934 views
in Technique[技术] by (71.8m points)

jvm - Java Could not reserve enough space for object heap error

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...