A Bat File Error - Please Help

Discussion in 'Bukkit Help' started by xDizasterCYx, Mar 31, 2014.

Thread Status:
Not open for further replies.
  1. hi guys,

    i have a problem with the file which it's called "run.bat"

    when i open it the server is not starting and this is happen:

    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .

    This is my code:
    @echo off
    java -Xmx4G -Xms4G -XX:permSize=216m -XX:MaxPermSize=526m -jar spigot.jar -o true

    PAUSE

    Guys i will appreciate it so much if you can help me and if you can show me similar code
     
  2. Offline

    ownercj

    I'll go off on a limb and say that you haven't set up your java path yet. Here's a quick fix for this:

    Go to the C:/ (the C drive)
    Find "Program Files" or "Program Files (x86)"
    If you see both "Program Files" and "Program Files (x86)", then open up "Program Files (x86)"
    Open up the "Java" folder
    Open up the "jre7" or "jre6" folder
    Open up the "bin" folder
    Now copy the directory tree at the top of the window.
    Example:
    http://i.imgur.com/rMNZAZQ.png
    When you click in that area it will show something like:
    "C:/Program Files (x86)/Java/jre7/bin"
    Now add on "/java.exe"
    So it says: "C:/Program Files (x86)/Java/jre7/bin/java.exe"
    Note: If you don't have the Program Files (x86) folder, it will say this:
    "C:/Program Files /Java/jre7/bin"
    Now, edit your batch file to say this:
    @echo off
    "C:/Program Files (x86)/Java/jre7/bin/java.exe" -Xmx4G -Xms4G -XX:permSize=216m -XX:MaxPermSize=526m -jar spigot.jar -o true

    PAUSE

    Important: Place quotes around the C:/Program Files (x86)/Java/jre7/bin/java.exe
    part in your code, otherwise it won't work
     
  3. really thank you for replying and this is so helpful but i have a simple problem:

    Invalid maximum heap size: -Xmx4G
    The specified size exceeds the maximum representable size.
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    Press any key to continue . . .
     
  4. Offline

    jrneulight

    Do you have 4GB of RAM in your system?
     
  5. Offline

    kungfuko

    You are running spigot. Bukkit does not support that. Lock this thread. Go and ask on spigotmc.org instead of here
     
  6. Offline

    TnT

    Locked. You seem to have found the wrong forum.

    For best results, always stick with the server you know and trust: CraftBukkit.
     
    JOPHESTUS likes this.
Thread Status:
Not open for further replies.

Share This Page