Solutions for you Run.bat errors [Windows Only]

Discussion in 'Bukkit Help' started by ItsSgtPetrenko, May 20, 2014.

?

Was this thread helpful?

  1. Yes

    66.7%
  2. No

    0 vote(s)
    0.0%
  3. I dont know

    0 vote(s)
    0.0%
  4. Kinda

    33.3%
  5. Bad, needs to be declared useless

    0 vote(s)
    0.0%
Thread Status:
Not open for further replies.
  1. Offline

    ItsSgtPetrenko

    Note:
    This is only for Windows Users only... Will or might add in OS X in future

    Hello there,
    This thread is only for those who have problems with the .bat files on CraftBukkit...

    As u might look into tutorials and solutions for this problem everyone has a different one and most of the times they do not work at all.

    Here are some common errors and their solutions...

    Error 1:
    "Java is not recognized as an internal command or external command"

    This error is the most common error and frankly saying I too had this error. But since I had learnt a bit of java and had some common sense, I figured out that the Code was not able to find Java.exe.

    The solution is pretty simple for this one..
    Firstly you need to go and find where Java is in you Operating System. It is commonly found in:
    "C:\Windows"
    The next thing you need to do is search for Java.exe. After you find it you need to copy the location of Java.exe into you .bat file which is required to start your server.

    Note:
    The Code may differ but it should look like this

    So you code should look like this:

    @echo off
    "C:/Windows/SysWOW64/java.exe" -Xms1024M -Xmx1024M -jar craftbukkit.jar -cp com.mojang.minecraft.server.MinecraftServer
    PAUSE

    Error 2:
    "Server is already running on that port"

    This is an error which occurs when your server has not shut down properly. This should be fixed with an easy command and not a code
    The following Command will kill your server and stop it from running when it is actually closed:
    "taskkill /F /IM java.exe"'

    This Command should be added to your run.bat file which is used to start your server or like me, make another .bat file called KillServer [Name it anything you want] and enter the command like this:
    "@echo off
    taskkill /F /IM java.exe
    pause"

    Before doing this command you need to know that this command will not kill you minecraft or any other program.

    Error 3:
    "-jar Craftbukkit.jar was not found"

    This is an error occurring when CraftBukkit.jar is not found in your Server folder. To solve this you need to rename your craftbukkit.jar file to the name you have chosen in you run.bat Code.

    [For eg: In your code '-jar Server.jar' so rename your Craftbukkit.jar or craftbukkit 1.7.9-RO.1 to Server.jar]

    Now this error will be fixed

    Recommended .bat Code:
    @echo off
    taskkill /F /IM java.exe
    "<Your Java File Path>" -Xms1024M -Xmx1024M -jar craftbukkit.jar -cp com.mojang.minecraft.server.MinecraftServer
    PAUSE

    Thank You for reading this thread,
    ItsSgtPetrenko [Sarge]

    You can suggest me more errors down below and I will get back to you

    Update #1
    - Some punctuation errors fixed
    - Adding on Unable to Create Virtual Machine error in the making
    - Changed recommended code to suit for all users
     
  2. Offline

    XRaRoCx

    well i have window 8 and i iwhs to create one too i have 3.5 gb of ram but i wihs to place 3 gb or rams to the server or 2.5gb of ram please help 64bit
     
  3. Offline

    ItsSgtPetrenko

    Firstly RAM allocated for a server goes by the multiples of 512. For eg: 1/2 GB is 512 and 1GB is 1024MB and so on...
    If u wish to create a server with 3Gb or 2.5 GB RAM with a computer with 3.5gb RAM it wont be possible because Windows and your Minecraft require RAM too. I suggest you start with a 1024MB server but if u get a computer with more RAM like 8GB then it is possible for you to make a server with the desired RAM. Since you have 64bit Java.. Then u can also do 1.5GB with 1536MB in your .bat file instead of 1024MB.
    Thanks,
    Sarge.
     
  4. Offline

    XRaRoCx

    thx but i can't put 1536 is dosent let me and this is the code i use​
    @echo off​
    "C:/Windows/SysWOW64/java.exe" -Xms1024M -Xmx1024M -jar craftbukkit.jar -cp com.mojang.minecraft.server.MinecraftServer​
    PAUSE​
    but even like that i can't join the server and i dont know why it doesn't appear even with my ip and i used hamachi but when i put the ip i says pingin and it stay like that and n the .bat file i said lost conect with my ip i just want to try to play with my friend but not even my can join the server and i think the plugin arent even loading if i join the server in another way and i have tried localhost but i just said the same thing lost connections please HELP give me and code with 1536mb that i can used please thx very much but only that code (i place in the top) work for my i have windows 8 ,64 bit the last java update PLEASE HELP ME i will thx you very much if you can help me with this THX and when i tried to join it said lost connect with my ip and i cant join and if i put the ip it just stay in pinging
     
  5. Offline

    ItsSgtPetrenko

    Does it show any error log, if u could find one then we could figure out how to solve the problem.The problem may even be that your connection is slow but it should work fine for you. Just try to find what is wrong because you need to do some research too. Plus try to enter your IP in Server IP in server properties (or p.file for some users).
    Go to cmd and type ipconfig and find your ipv4 then put it in.
    Tell me if this works.
    I am not much expert in hamachi so if you do use it I may not help you with some errors but ill try my best.
    Thanks,
    Sarge
     
  6. Offline

    Iroh

    Removed request for help from offline mode server.
     
Thread Status:
Not open for further replies.

Share This Page