Run .bat won't run ! Need Help !

Discussion in 'Bukkit Help' started by SmrussGamer, May 21, 2014.

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

    SmrussGamer

    I have been searching for years and i didn't find 1 that fixed this run.bat
    before it works but after 3 years when i make another server it won't run now :(

    This is the thing in my batch file :
    [​IMG]

    When i start the server , this will be the error :
    [​IMG]

    Here's information about my computer :

    [​IMG]


    And here's another error on my minecraft cracked launcher (i cant play minecraft):

    [​IMG]




    I Already Download Java and it's Java7 and i don't know why this error is still in my computer
    I hope you guys will help me on this problem , Thanks :D

     
  2. Offline

    Bobcat00

    You only have 2 GB of memory and a 32-bit OS, but you're trying to allocate 2 GB for the Java heap.

    Try this:
    Code:
    "C:\Program Files\Java\jre7\bin\java.exe" -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true
    
     
    JaguarJo and MrSparkzz like this.
  3. Offline

    DrPyroCupcake

    SmrussGamer do you not have the game? Also if you're running a cracked launcher doesn't that mean you can't connect to online mode servers? So your server must be offline mode?
     
    JaguarJo likes this.
  4. Offline

    manofdoom

    Try this
    Code:
    java -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true
     
  5. Offline

    LHammonds

    Ya, you don't have much memory. 2GB is it. Windows typically hogs 1 GB of that. If you allocate 1GB to the server, you are gonna have issues trying to run a client on it too.

    Try to go with the smallest amount of ram needed to run your server

    Here is a batch file I use which works well on no matter what Windows PC I run it on...so long as the java is installed to default folders. You can tweak how many megabytes to use on line #2 and set the folder where you have your craftbukkit.jar on line #3

    start-server.bat
    Code:
    @ECHO OFF
    SET RAM2USE=768
    CD /D C:\Craftbukkit
    TITLE DoomCraft
    
    REM ** Look for a version of Java 8 that matches the OS (32-bit for 32-bit, 64-bit for 64-bit) **
    IF EXIST "%ProgramFiles%\Java\jre8\bin\java.exe" GOTO JAVA8DEFAULT
     
    REM ** Look for 32-bit version of Java 8 on 64-bit OS **
    IF EXIST "%ProgramFiles(x86)%\Java\jre8\bin\java.exe" GOTO JAVA832BIT
     
    REM ** Look for a version of Java 7 that matches the OS (32-bit for 32-bit, 64-bit for 64-bit) **
    IF EXIST "%ProgramFiles%\Java\jre7\bin\java.exe" GOTO JAVA7DEFAULT
    
    REM ** Look for 32-bit version of Java 7 on 64-bit OS **
    IF EXIST "%ProgramFiles(x86)%\Java\jre7\bin\java.exe" GOTO JAVA732BIT
    
    REM ** Look for a version of Java 6 that matches the OS (32-bit for 32-bit, 64-bit for 64-bit) **
    IF EXIST "%ProgramFiles%\Java\jre6\bin\java.exe" GOTO JAVA6DEFAULT
    
    REM ** Look for 32-bit version of Java 6 on 64-bit OS **
    IF EXIST "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" GOTO JAVA632BIT
    
    :JAVA8DEFAULT
    REM ** This will execute if run on a 32-bit OS with a 32-bit version of Java 8 **
    REM ** This will execute if run on a 64-bit OS with a 64-bit version of Java 8 **
    "%ProgramFiles%\Java\jre8\bin\java.exe" -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar server.jar nogui
    GOTO DONE
     
    :JAVA832BIT
    REM ** This will execute if run on a 64-bit OS with only a 32-bit version of Java 8 **
    "%ProgramFiles(x86)%\Java\jre8\bin\java.exe" -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar server.jar nogui
    GOTO DONE
     
    :JAVA7DEFAULT
    REM ** This will execute if run on a 32-bit OS with a 32-bit version of Java 7 **
    REM ** This will execute if run on a 64-bit OS with a 64-bit version of Java 7 **
    "%ProgramFiles%\Java\jre7\bin\java.exe" -XX:MaxPermSize=128M -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar nogui
    GOTO DONE
    
    :JAVA732BIT
    REM ** This will execute if run on a 64-bit OS with only a 32-bit version of Java 7 **
    "%ProgramFiles(x86)%\Java\jre7\bin\java.exe" -XX:MaxPermSize=128M -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar nogui
    GOTO DONE
    
    :JAVA6DEFAULT
    REM ** This will execute if run on a 32-bit OS with a 32-bit version of Java 6 **
    REM ** This will execute if run on a 64-bit OS with a 64-bit version of Java 6 **
    "%ProgramFiles%\Java\jre6\bin\java.exe" -XX:MaxPermSize=128M -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar nogui
    GOTO DONE
    
    :JAVA632BIT
    REM ** This will execute if run on a 64-bit OS with only a 32-bit version of Java 6 **
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -XX:MaxPermSize=128M -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar nogui
    GOTO DONE
    
    :DONE
    REM ** This will pause the screen so you can see any error messages after stopping the Minecraft server. **
    PAUSE
    
    LHammonds
     
  6. Offline

    DrPyroCupcake

    LHammonds I agree, but if he ran it with that little amount of RAM the server could lag if he put a decent amount of plugins on it. I think he should ether upgrade his computer or just get a host.
     
  7. Offline

    LHammonds

    I too think it is a minimalistic system and one that should only run dedicated server (no client) but this person was asking how to get it running on "this" machine as if he didn't have the cash or resources to get or use a different one.

    If it were me in this situation, I'd remove Windows completely and setup Ubuntu Server and get the OS to using just 300 MB of RAM. I wouldn't be surprised if the hardware is 64-bit capable so I'd try to stick 64-bit Ubuntu Server on there and if possible, add some more RAM to the system.

    But that's just me...I know how to do all these things.

    The best we can hope for this fella is that he will not run MC client at the same time as the server on this machine and that he won't go plugin-crazy cause it will barely run a vanilla server.

    LHammonds
     
    JaguarJo and DrPyroCupcake like this.
  8. Offline

    SmrussGamer


    LHammonds LHammonds

    What is Ubuntu Server btw ? :confused: will that thing helps me to make my server not lag ? or something ?

    manofdoom

    Thanks dude ! It works but sometimes it works and sometimes it doesnt works :/ i just want to know why ?
    btw, im using Spigot now... and i have installed DeepFreeze i forgot to tell you about it sorry..

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  9. Offline

    TnT

    Locked. Find support for unofficial builds and mods where you found that software. These forums are for support of Bukkit/CraftBukkit.
     
Thread Status:
Not open for further replies.

Share This Page