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
Snow Kit
Snow Kit2mo ago
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)
Snow Kit
Snow Kit2mo ago
if you shift right click in a folder, you get an "open in terminal" or "open in command prompt" option
No description
Babka Z Krzyżówki
With a pause it spits out this
Snow Kit
Snow Kit2mo ago
try 2048M instead
Babka Z Krzyżówki
same thing For info: my ram is 16GB
Snow Kit
Snow Kit2mo ago
what does java -version output?
Snow Kit
Snow Kit2mo ago
sorry, you need to remove the space between -Xms and 2048M
Babka Z Krzyżówki
O yeah that worked ffs Such a dumb mistake on my side mb

Did you find this page helpful?