Java wont let me start with 4gb of ram

Discussion in 'Bukkit Help' started by Blank1268, Feb 19, 2011.

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

    Blank1268

    Ok, so I was moving my server over from my laptop to my desktop and when i tried to start the server on ym desktop with -Xms4096M -Xmx4096M I got this error
    Code:
    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 . . .
    any help?
     
  2. Offline

    Plague

    I think you have 32b Java, you need 64b for this amount of memory.
     
  3. Offline

    Blank1268

    That would make sense
    I will give it a try
    --- merged: Feb 20, 2011 1:31 AM ---
    Ok
    so i got 64bit java but it is still saying the same thing, is there somethign i have to change for it to realize i have 64 bit java?
     
  4. Offline

    mughi

    if windows: use ie64 bit, go to www.java.com
    else (or if you can't find ie64bit),
    this page should always provide the latest jre
    (click JRE under the java picture)
    --- merged: Feb 20, 2011 1:34 AM ---
    well.. i guess you didn't need that info
     
  5. Offline

    Blank1268

    I have 64 bit java now, but it's still not working
     
  6. Offline

    Plague

    It should not be the problem, but try omittin the -Xms option it is not even good to use that big AFAIK.
     
  7. Offline

    mughi

    try starting your server with

    java -d64 -Xincgc -Xmx4G -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
     
  8. Offline

    Blank1268

    Ok, So i used this in my server.bat
    Code:
    @echo off
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" 4096M -jar craftbukkit.jar
    pause
    and got this error
    Code:
    Exception in thread "main" java.lang.NoClassDefFoundError: 4096M
    Caused by: java.lang.ClassNotFoundException: 4096M
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: 4096M.  Program will exit.
    Press any key to continue . . .
    what can I do to fix the file?
     
  9. Offline

    Plague

    add -Xmx in front of the 4086M
     
  10. Offline

    kjab

    @echo off
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -d64 -Xgcinc -Xmx4G -jar craftbukkit.jar
    pause
     
  11. Offline

    mughi

    first of all, that is probably not 64bit java.. (since it is in the x86 folder)

    but your main error is caused by the lack of -Xmx in front of 4096m [should have been -Xmx4096M)
    --- merged: Feb 20, 2011 1:46 AM ---
    ninajed x2
     
  12. Offline

    Blank1268

    ok I did that and I got yet another error
    Code:
    Invalid maximum heap size: -Xmx4096M
    The specified size exceeds the maximum representable size.
    Could not create the Java virtual machine.
    Press any key to continue . . .
    is is possibale i need to change the "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" part of it
     
  13. Offline

    mughi

    drop the (x86) part and see if that fixes it
     
  14. Offline

    Blank1268

    It does it does
    success
    ^.^ thanks everyone I have no idea what I would do with you
     
  15. Offline

    Plague

    Well waited in sadness and then got fed up with waiting and used google for a while and maybe solved it by yourself ;)
     
Thread Status:
Not open for further replies.

Share This Page