What is wrong with this line of code?
The guide you linked is wrong in two ways.
- It suggests, that the server is distributed in an exe file format, while it is usually a file named
server.jar
- It saves the start script with the
vbs
extension instead ofbat
.
The correct way
Obtain the server executable from the official site.
Note: This guide assumes, that the downloaded file is calledserver.jar
. If not, you should rename it.Type the following text into a notepad, and save it as
start.bat
in the same folder as your server executable jar-file.
Note: You can change the amount of memory allocated to your server by changing the values afterXmx
andXms
.Xmx
sets the maximum amount of used RAM,Xms
sets the amount of RAM allocated on start. It is recommended for the two to have the same value, but it isn't required. AppendM
to the value to indicate megabytes, orG
to indicate gigabytes.
java -Xmx1024M -Xms1024M -jar server.jar nogui
pause
(After this you can follow the original guide.)
Run thestart.bat
file, and you'll get an eula.txt file. Open it, and change the lastfalse
totrue
. Save and run the file again.Now the server files should've generated, and the basic setup should be done. You might want to change some settings in the server.properties file.