Solved Help With Run.bat

Discussion in 'Bukkit Help' started by XD_Gaming, May 6, 2013.

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

    XD_Gaming

    When I created my server and put in the right stuff for the bukkit run.bat it shows this when I open it; 'Java' is not reconised as a internal or external command. May I please Have some assistance?
     
  2. Offline

    Polishgaming

    Does it automatically do that when you first start up your server (you click run then the in the first 10 lines it says that)? If it does the try making a new run.bat and type in the lines. Best of Luck! ~Polish
     
  3. Offline

    caelum19

    Have. You. Installed. Java.
     
  4. Offline

    XD_Gaming

    Yes. I. Have.

    I double click it and it says That.

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

    Polishgaming

    Does it show up in the command prompt or in a window?
     
  6. You obviously don't know what the error is.

    The problem is its not finding the java executable so you can either modify the systems environment paths or directly link it to java.

    Ex. C:/path/path/path/java -Xmx.... Etc.
     
  7. Offline

    Dead-i

    Though I'm not very experienced with bat files, that error message sounds like it isn't from Java itself, suggesting it can't actually find the java.exe you are referring to.

    You might want to try using a full path to java.exe rather than abbreviating it with %ProgramFiles% in “%ProgramFiles%\Java\jre6\bin\java.exe”. I recommend you try find your java.exe and replace this with the full path to it, surrounded with quotation marks like this is. In Windows there's two Program Files if I remember correctly (one for 32-bit and one for 64-bit), so your %ProgramFiles% abbreviation may be referring to the wrong one. The java.exe you're hunting for should be located in C:\Program Files or C:\Program Files (x86) in a folder called "Java".

    As I said though, I don't have much experience in this, I might be completely wrong. Good luck:)
     
  8. Offline

    XD_Gaming


    Dead-i


    I searched for a java file in %Programfiles% I coulden't find one, could it be because I'm using a laptop?

    Now its giving me "the filename, directory name, or volume label syntax is incorrect."

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

    Bobcat00

    This is my command line. Win7 64-bit, Java 64-bit. The quotes are REQUIRED!
    Code:
    "C:\Program Files\Java\jre7\bin\java.exe" -Xms4096m -Xmx4096m -jar craftbukkit.jar -o true --log-limit 524288 --log-count 10 --log-strip-color
    
     
  10. Offline

    XD_Gaming


    Bobcat00

    Anything for 32 bit?


    Do you have any code for 32 bit Java?

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

    Bobcat00

    "C:\Program Files (x86)\Java\jre7\bin\java.exe"
     
  12. Offline

    XD_Gaming


    Thanks, I will try it out


    Bobcat00

    I'm getting weird errors now,
    invalid initial heap size: -Xms4096m
    The specified size exceeds the maximum representable size
    ERROR: Could not create the Java Virtual Machine
    ERROR: a fatal exception has occured. Program will exit.


    Dead-i

    It will open now, but it gives me these errors, does anyone know about these?
    invalid initial heap size: -Xms4096m
    The specified size exceeds the maximum representable size
    ERROR: Could not create the Java Virtual Machine
    ERROR: a fatal exception has occured. Program will exit.

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

    iliketobike

    The -Xms is the initial amount of ram dedicated. If you don't have enough then you won't be able to start it. Try starting it with a smaller amount such as -Xms1024 and -Xmx2G. As for not being able to find your bukkit.jar file, make sure that you re-name your bukkit.jar file. When you download craftbukkit it dosn't initially have the name "craftbukkit" it has the version along with it, so you will need to re-name it to craftbukkit.jar and then you can use:

    java -Xms1024M -Xmx2G -jar craftbukkit.jar -o flase
    PAUSE
     
  14. Offline

    XD_Gaming


    iliketobike


    Now its giving me:
    ERROR: Could not find or load the main class java
     
  15. Offline

    Bobcat00

    You can't allocate a 4 GB heap with 32-bit Java. Start with 1024m and then try 1536m.
     
  16. Offline

    XD_Gaming


    Fixed that, just now how should I fix this?

    ERROR: Could not find or load the main class java
     
  17. Offline

    Bobcat00

    OK, what is your complete command line now?
     
  18. Offline

    danoljwz

    Thank you! i had this problem for weeks and your bat worked perfectly
     
Thread Status:
Not open for further replies.

Share This Page