CraftBukkit launcher guide

Discussion in 'Bukkit Help' started by InhumanSkills, Jan 18, 2011.

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

    InhumanSkills

    What is a .bat file?
    A .bat file is just a launchable file that performs the task written within the file.

    First of all make sure you are using Notepad to edit the file.
    After you copied one of the texts below save it as "Launcher.bat" and it will automatically format it into a .bat file that you can use to launch CraftBukkit and later Bukkit.

    ===============================================================================

    32 bit USERS PLEASE READ HERE

    The maximum amount of RAM you will be able to allocate for your 32bit Java is 1024M (1GB)!!!
    32 Java does recognize a maximum of 1536M (1.5GB) but will it will only use 1GB


    If you get this error


    "Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine."

    You need to set it to -Xms1024M -Xmx1024M

    If this still fails your computer might not have enough RAM available.

    32bit .bat should look like

    @echo off
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms1024M -Xmx1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause

    ===============================================================================

    64 bit USERS PLEASE READ HERE

    Lucky you you have an awesome computer!!!
    You can change the -Xms1024M -Xmx1024M to whatever you would like!
    For optimal performance use whole intervals of 1024M (1GB)

    Examples:
    1GB = 1024
    2GB = 2048
    3GB = 3072
    4GB = 4096
    12GB=12288 <--- Thats me =D

    64 bit .bat should look like
    (This will reserve 4096M(4GB) of Ram for Java)


    @echo off
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms4096M -Xmx4096M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause

    If you for some odd reason want to run your server on 32bit although you have 64bit use this path

    @echo off
    "C:\Program Files (x86)\Java\jre6\bin\java.exe" -Xms1024M -Xmx1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause

    ===============================================================================

    The Green is the directory where you computer will look for the java to run your program.
    You can see the location by right clicking your java.exe and looking at the security tab, it will be the object name.

    The Gray is the initial and maximum "heap" size. This is the amount of RAM you want to allocate for Minecaft.

    Please note that Java only takes whole GB increments so there is no point of making it 2560 (2.5Gb) because it will only use upto 2048(2GB).

    The Red is the .jar file you want java to execute. In this case it is "craftbukkit-0.0.1-SNAPSHOT.jar" you can rename the file to whatever you like but just make sure that the line in your .bat file has the same name or you will get an error message telling you it could not be executed. "Unable to access jarfile craftbukkit.jar" Because you did not name it "craftbukkit-0.0.1-SNAPSHOT.jar"

    Want to give you server a little boost?

    Go to your task manager (Ctrl-Shift-Esc), under processes find java.exe, right click it and under Set Priorities set it to Realtime. If it will not let you do this that is because you are not the administrator. To combat this simply click on "Show processes from all users" and try again.

    What this does it tells your computer that you think the Java program is important and thus your computer will focus on executing those tasks first. This might make other programs slower.

    Tired of Minecraft itself being too slow?

    javaw.exe is the Minecraft program itself, so the players on your server can set that to Realtime too.

    I have not seen a great improvement in performance when doing this but in theory it should help out the players on your server.
     
  2. Offline

    subram

    nice tut
     
Thread Status:
Not open for further replies.

Share This Page