Invalid initial heap size -Xms4096M

Discussion in 'Bukkit Help' started by AcedGod, Dec 23, 2012.

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


    When I try to allocate more than 1 Gig of RAM to my bukkit server it gives me this error. I am using Windows 7 Ultimate 64 bit. I

    Invalid initial heap size: -Xms4096M
    The specified size exceeds the maximum representable size.
    Could not create the Java virtual machine.
    Press any key to continue . . .
    Here is my launch.bat

    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx1024M -Xms4096M -jar craftbukkit-1.4.5-R0.2.jar
    I have recently formatted my computer and re installed java. I keep downloading trying to download Java 6 64-Bit but nothing happens when I try to download it from here:

    Thanks in advance
  2. Offline


    You might be trying to allocate more RAM than you have. btw you're allocating 4Gigs not 1. -Xms4096M
  3. Offline


    I have 4 Gigs of RAM
  4. Offline


    The maximum heap size is system- and JVM-dependent. Often 2GB or 4GB for 32-bit systems, but even then you will need space for the stack and JVM itself. If you have a 64-bit system and a 64-bit JVM, see if it helps to add -d64 to your command line to run the JVM in 64-bit mode, as it may be defaulting to 32-bit.
  5. Offline


    Where do I add it? Being a complete noob, I have no idea where to add the -d64
  6. Offline


    If your computer has 4Gb of ram then you don't allocate 4gb the Os needs around 1.5Gb to be stable.
  7. Offline


    It's always best if you set it 1 GB below the amount you have, for background processes so you don't end up crashing.
  8. Offline


    Ok so I changed it to 2 Gigs but I now get this error.

    Error occurred during initialization of VM
    Incompatible minimum and maximum heap sizes specified
    Press any key to continue . . .
  9. Offline


    This is extremely simple. Your flags are messed up. -Xms and -Xmx need to be switched. Your current flags are telling the JVM that the minimum to allocate is 4gb, but the maximum it can allocate is 1gb. This obviously won't work since the maximum must be higher than the minimum. Just use this:
  10. Offline


    Sorry, didn't see this before. Not sure it's still relevant, but -d64 goes next to the other options, and the order doesn't matter (but don't put it between -jar and craftbukkit.jar!):

    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -d64 -Xms1024M -Xmx4096M -jar craftbukkit-1.4.5-R0.2.jar
    EDIT: I see evidence now that your JVM is 32-bit, so this may fail entirely.
  11. Offline


    Like falkensmaze said %ProgramFiles(x86)% references the 32 bit version of java6.
    Change your batch file to use %ProgramFiles% so the proper 64 bit version of java is installed and likewise
    make sure you have installed the 64 bit java version. 32 bit java cannot allocate more than around 1.5Gigs.
    falkensmaze likes this.
Thread Status:
Not open for further replies.

Share This Page