[SOLVED] Error occurred during initialization of VM

Discussion in 'Bukkit Help' started by byzantinian, Mar 30, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    byzantinian

    So i'm sure everyone knows this error by now

    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    Press any key to continue . . .
    So for the last two weeks, i've been using my desktop with 6GB of RAM and through the run.bat script made it as high as 1568MB that I could dedicate.

    Well I just got my 2nd set of RAM so now i've got 12GB (6x2) and I still can't go higher. Am I missing something? I don't know much about the java code line

    Code:
    @ECHO OFF
    SET BINDIR=%~dp0
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx1586M -jar "%BINDIR%\craftbukkit-0.0.1-snapshot.jar"
    PAUSE
    but I've seen people with 8G in there so I know it's possible. Also going the

    Code:
    @echo off
    SET BINDIR=%~dp0
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx1586m -Xms1586m -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause
    route doesn't do anything better for me either. I know a little about java but the difference between "xmx/xms" and "xincgc/xmx" escapes me. halp plox.
     
  2. Offline

    bastion

    you have to use a 64 bit java version. google windows 64 bit java.
     
  3. Offline

    byzantinian

    yeah i noticed my the process was running as java 32-bit, but it's only running at half of what a 32-bit system can recognize. I didn't think that could be it. I'm sure it is, it just doesn't make sense to me that I need a 64-bit version to use more RAM beyond 1.5 rather than 3.5...unless that's a known limitation with Java.
     
  4. Offline

    TnT

    Java x86 can only use 1536M - hence yes, its a Java limitation.

    If you have x64 Windows, open IE x64, goto java.com, download and install. Then try with this batch file:
    Code:
    @echo off
    java -Xincgc -Xmx3G -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    pause
    
     
  5. Offline

    byzantinian

    wow thanks! I didn't know there was a magic number for 32bit java. thanks for all the help everyone. I'm usin Win7 64-bit so i'll go do that tonight =)
     
Thread Status:
Not open for further replies.

Share This Page