I've been trying to start a Minecraft server. I read a small guide and followed the steps, until I tried to run this code:
java -Xmx1G -Xms200M -jar minecraft_server.exe nogui
pauseI keep getting the Windows script reader error code "800A0401", accompanied with the message "Expected end of statement". What does this mean and how do I fix it?
52 Answers
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
vbsextension 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.batin 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 afterXmxandXms.Xmxsets the maximum amount of used RAM,Xmssets the amount of RAM allocated on start. It is recommended for the two to have the same value, but it isn't required. AppendMto the value to indicate megabytes, orGto indicate gigabytes.
java -Xmx1024M -Xms1024M -jar server.jar nogui
pause(After this you can follow the original guide.)
Run thestart.batfile, and you'll get an eula.txt file. Open it, and change the lastfalsetotrue. 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.
The command should look like this:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.15.2.jar nogui
pauseYours didn't look like this, specifically this part:
-Xmx1024M -Xms1024MThere are a few other possible reasons why this didn't work. One obvious one is that you didn't install Java. Another one would be that you might have not set the EULA to 'true'. The last one I can think of is you don't have the .JAR extension showing up. If it doesn't, in File Explorer, at the top tabs, click on View. Then, check "File name extensions". If you don't understand, see the image below:
4