Java / Bukkit memory

Discussion in 'Bukkit Help' started by mncat77, Nov 24, 2012.

Thread Status:
Not open for further replies.
  1. Hello,
    I am wondering why I can't give Java more memory to run Bukkit...
    I have 16G RAM (I tested that with
    Code:java
    1. System.out.println(((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize());
    2. System.out.println(((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize());
    and got
    Code:
    17162158080
    12763049984
    ), but I can't give Java more memory than 1582M otherwise I'll get
    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    ...
    Does anyone know what's going on and how I can help it?

    (OS: Windows 7 64Bit, Java: 64Bit)
     
  2. Offline

    JWhy

    You should use standard space amount like 1536M, 2G, 4G and so on. Powers of two
     
  3. I think I mentioned that I can't go over 1582M, right? That what said is not my problem at all...
     
  4. Offline

    JWhy

    I think 2G will work rather than 1582M, as 1582M isn't a power of two
     
  5. 1582M works if I go over it (yes also 2G) I get the
    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    Error...
     
  6. Offline

    pr3detor2

    install the 64x version of java and make it standard 2gb (2048m)
    and delete c:\programfiles(86x)\java
     
  7. Offline

    midnightfang22

    Sounds like you are using Java 32 bit when craftbukkit tries to start. Try putting the direct path to java 64 bit?
     
  8. I don't see why Java 32 Bit wouldn't allow me to use my memory... and what do you mean by putting the direct path to java 64 bit?
     
  9. Offline

    midnightfang22

    32 bit programs/OS/Java has a maximum memory of about 1.5GB allowed for any 1 process. 64 bit allowed for unlimited. Get the path to java.exe, for example C:\Program Files\Java\...
     
  10. Mhm just realised my classpath was still to 32Bit Java... Well I changed it and it's still not working, how do I do that in the start batch?
     
Thread Status:
Not open for further replies.

Share This Page