I tried to create my own Minecraft server on my PC 1.16. After installing the server.jar file and after installing Java, I tried to open the file with a double click as described in the Youtube tutorial. But nothing happened after several attempts a winrar folder system opens, but the right thing doesn't happen as in the video. Even opening with Java SE does not work. Can someone help me? The YouTube tutorial from the server is here
Did you restart your computer after installing Java?
No do i have to?
Completly wrong. You have to open that with a bat. With this:
java -Xmx2048M -Xms2048M -jar server.jar nogui
Break
behind Xmx… And Xms you write the maximum ram for the server. 2048 is recommended. Pause is there because the window is changing into a console and should therefore not be closed. Stop the server by typing stop in the console. Never close the CMD window.
If it does not appear with Open with. I would definitely try it.
This is a vanilla server. It can be started with a double click.
But if Java doesn't even show up when "Open with". Then the environment variable "java" will not work yet.
Yes, but it'll crash again. Vanilla or not makes no difference. You don't open a console and so the server is stopped again. Just like when you close it like that.
Where exactly should I insert the command? In the console "cmd '" or where else
If you have restarted your computer after installing Java and it still doesn't work, try creating a new text file that you call start.bat. It is important that you change the file extension. Filename extensions need to be turned on to make sure you're doing this. This works when you are in File Explorer under the tab "View" and the checkmark "File name extensions" must be set on the right side.
So go to your folder where the server.jar is also in there.
Then right-click → New → Text Document. You then rename it to start.bat. It is important that the .txt disappears.
Then right-click → edit and write in there:
java -jar server.jar
or what your server.jar is called. For example, if the name is spigot-1.16.4.jar you write that instead of server.jar.
Then you save the file and double-click on it. Then it should work.
Open it via Java command without Gui as described by Sebi.
Double click is with a mini GUI and runs nastily unstable.
If something has happened, check whether a eula has been created in the folder. You have to set it to true
When WinRAR opens then the jar might be downloaded as a zip that sometimes happens
Should start anyway if you open the jar like this. What you mean is with Bukkit or Forge servers that have to be started with arguments.
But it still helps with debugging, because then the console stays there and you may see errors
A batch file. Create a new text document, enter
java -Xmx2048M -Xms2048M -jar server.jar nogui
Break
a. Save as / as and change to .bat instead of .txt. Then double click
Note: it must be in the same directory as the server.jar.
Thanks