.bat doesn't work for my server

C_N1

n00b
Joined
Nov 20, 2013
Messages
35
I have a normal pc that I am using as a game server. I have windows vista business SP2 32bit on it. I want to run a .bat file to open the vanilla minecraft server with more ram, but whenI run the .bat file a cmd window appears and then disappears, that's it. I couldn't find an answer to what it might be PLEASE HELP! :(
 
Open a command window at the location of the .bat file, then run the bat file from the command line and see what happens.

My money is on your having set a path incorrectly in the batch file.
 
You can also put the command "pause" at the very end of the batch file, which will stop it from automatically closing. The reason why it is closing is because there is an error at some point, which is most likely what cortex said: a wrong path set somewhere.
 
java -Xms1024M -Xmx2048M -jar minecraft_server.jar nogui
pause
 
I have "pause" written there, can it be that windows is disabling the bat file, I am the admin of the pc, but even with the "pause" it will close :/
 
My bet is you have to specify full path for Java. Java by default isn't in the path. Change your java command to include the full path to Java. If there is a space in the path you have to double quote the whole thing
 
in cmd, run the java -Xms1024M -Xmx2048M -jar minecraft_server.jar nogui in the directory the minecraft_server.jar is located. It may not be the .bat file at all.
 
I went and did some testing and downloaded the Minecraft_server.1.8.jar file from https://minecraft.net/download. The minecraft_server.jar or minecraft_server.1.8.jar is no where to be found. Which would make the whole .bat file useless... Unless I'm missing something but after reading the wiki on it, it seems like the file should be present but it is not. If you downloaded 1.8 you may want to try 1.7. I even tried running cmd in the minecraft_server.1.8 folder with no dice. To me it sounds like something is missing.
 
As H-Street said if you don't have the path to Java defined in your system's environment variables, running "Java" anything at the command line without expressly defining the path to it beforehand is not going to work.

I would say hit this page and read the instructions from top to bottom.

I went and did some testing and downloaded the Minecraft_server.1.8.jar file from https://minecraft.net/download. The minecraft_server.jar or minecraft_server.1.8.jar is no where to be found. Which would make the whole .bat file useless... Unless I'm missing something but after reading the wiki on it, it seems like the file should be present but it is not. If you downloaded 1.8 you may want to try 1.7. I even tried running cmd in the minecraft_server.1.8 folder with no dice. To me it sounds like something is missing.

There is a jar and there is an exe version of the server. The Minecraft site's "server" section points to downloading the exe first, since it's easy, and then the .jar second. since it's more configurable.
 
Back
Top