The initialization file ensures that you use the same jar file, Java path, and memory settings every time you boot. Keep file format separate for Windows and Linux.
Step by step
-
Check the actual name of the server jar file. For example, if you are using
paper.jar, type the same name in the command. -
In Windows, open
start.batin the server directory. Writecd /d "%~dp0"on the first line andjava -Xms1G -Xmx3G -jar paper.jar --noguion the second line. -
On Linux, put
#!/bin/shin the first line of thestart.shfile and use the same Java command. While in the server directory, run it withsh start.sh. -
Check that it is opened with the correct jar and working directory in the console. Log in locally and close regularly with
stopfrom the console.
Keep in mind
-Xmx is not the entire machine memory. Leave space for non-heap usage of the operating system and Java.