Startup batch file doesn't start server if it includes
My startup batch file (java -jar server_1.20.6.jar --nogui) starts the server normally. The server works fine but when the -xmx and -xms lines are added to limit ram usage the batch file closes on itself without anything of note. What am I doing wrong? Each method i tried of hosting a server from a yt video didnt work but the offical mc documentation allowed me to run it no problem without the Xmx and Xms line.
11 Replies
what if you either put a
pause
line after the java command in the batch file, or just run the exact command from the batch file inside of command prompt (in the server directory)if you shift right click in a folder, you get an "open in terminal" or "open in command prompt" option


With a pause it spits out this
try 2048M instead

same thing
For info: my ram is 16GB
what does
java -version
output?
sorry, you need to remove the space between -Xms and 2048M
O yeah that worked
ffs
Such a dumb mistake on my side mb