Java 无法为对象堆错误保留足够的空间
我在 32 位 Windows 和 4 GB RAM 上运行 Java7,但是:
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:
虚拟机初始化过程中发生错误
无法为对象堆保留足够的空间
错误:无法创建 Java 虚拟机.
错误:发生了致命异常.程序将会退出.
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
正在工作.为什么?
推荐答案
转到开始
→控制面板
→系统
→高级系统设置
→advanced(tab)
→环境变量
→系统变量
→新
:
Go to Start
→ Control Panel
→ System
→ Advanced system settings
→ advanced(tab)
→ Environment Variables
→ System Variables
→ New
:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
相关文章