Problem running server through batch file for adding extra ram [Java]

Discussion in 'Off Topic' started by JorgeDamien, Mar 26, 2020.

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

    Joined:
    Mar 26, 2020
    Messages:
    1
    Likes Received:
    0
    Hello, I recently started a server and I realized I need more ram to run it properly. My brothers PC had double my ram (16G) so I transferred the server over to his. I then made the .bat file and put in the command line for adding extra ram.omegle discord xender With pause added to the text, I can see what the issue is and it says “error, can not locate server.jar file. I looked up many ways of fixing this and nothing worked. I have Java 64 bit latest version installed, I have no other versions of Java installed, and I have QUADRUPLE CHECKED and made sure the the command line matches my server jar name. Any help would be GREATLY appreciated.
     
    #1 JorgeDamien, Mar 26, 2020
    Last edited: Mar 31, 2020
  2. xBenz

    Joined:
    Jul 22, 2019
    Messages:
    331
    Likes Received:
    557
    xBenz
    If it says "cannot locate server.jar file" - That means the server.jar file is not in the same directory with the .bat file
    Double-check, are you sure it's in there? In the same directory?
     
  3. DrBrando

    Joined:
    Mar 19, 2020
    Messages:
    87
    Likes Received:
    105
    DrBrando
    Hey, whenever i run a server this is the start script i run,


    @ECHO OFF
    java -Xms1024M -Xmx2048M -jar minecraft_server.jar nogui
    pause




    after i get a successful first launch i apply more memory to the xmx argument. Idk if this will help. Also make sure your server is binding to the correct port. You can check for an open port at canyouseeme.org
    [/QUOTE]
    Also, what server version are you attempting to run? Spigot/Vanilla/forge? Ver number?
     
    #3 DrBrando, Mar 29, 2020
    Last edited by a moderator: Apr 6, 2020
  4. creeper7777777

    Joined:
    Jul 23, 2019
    Messages:
    195
    Likes Received:
    248
    creeper7777777
    The .bat file has to be in the same file as the server.jar is. You an also do the command "cd <directory>" to make it act as if it were in that folder.
    Tip: if you run multiple server cmds at the same time, you can also run the command "title servername Console," so you can label which console is which.
     
Thread Status:
Not open for further replies.

Minecraft Central Store | Powered by Xenforo | Minecraft Central Rules
The MCC server is in no way affiliated with Mojang, AB. Nor should it be considered a company endorsed by Mojang, AB.