Java Could not reserve enough space for object heap error

后端 未结 8 1794
闹比i
闹比i 2020-12-08 10:56

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 -j         


        
相关标签:
8条回答
  • 2020-12-08 11:16

    If you go thru this IBM link on java, it says that on 32 bit windows the recommended heap size is 1.5 GB and the Maximum heap size is 1.8 GB. So your jvm does not gets initialized for -Xmx2G and above.

    Also if you go thru this SO answer, clearly the DLL bindings are an issue for memory reservation changing which is no trivial task. Hence what may be recommended is that you go for 64-bit Windows and a 64-bit JVM. while it will chew up more RAM, you will have much more contiguous virtual address space.

    0 讨论(0)
  • 2020-12-08 11:17

    to make sure it runs the 64 bit version of java have it like this:

    "c:\Program Files\Java\jre7\bin\java.exe" -Xmx1536M -Xms1536M -XX:MaxPermSize=256M -jar forge-1.6.4-9.11.1.965-universal.jar

    take a look at what jre version you have installed just in case.. x64 should be in program files while x32 resides in Program Files (x86)

    0 讨论(0)
提交回复
热议问题