How to run minecraft server jar
Emma Payne
Published Mar 27, 2026

A quick tutorial on how to run your minecraft_server.jar file as an executable, rather than leaving it as a .jar file and being unable to open it.
There are other answers below:
OS X: java -Xms1G -Xmx1G -jar minecraft_server. 1.7.10.jar nogui. Linux: java -Xms1G -Xmx1G -jar minecraft_server. 1.7.10.jar nogui. The above commands will execute the Minecraft server JAR file. The command runs Java, assigns 1GB of memory/1GB max, indicates the file is a JAR, names the JAR, and indicates no GUI is needed.
Open the Terminal: Applcations > Accessories > Terminal. and then change directories to where the Minecraft server jar is located with the cd command. Then type in java -jar minecraft_server.jar. Additional arguments: You can add no gui to the end of the command to open the server without the GUI.
Open the Terminal: Applcations > Accessories > Terminal. and then change directories to where the Minecraft server jar is located with the cd command. Then type in java -jar minecraft_server.jar. Additional arguments: You can add no gui to the end of the command to open the server without the GUI
It works with every other jar file but not with server. This is the code im using (Im using Java 17): public static void main (String args []) { try { String [] exec = new String [3]; exec [0] = “java”; exec [1] = “-jar”; exec [2] = “C:/Users/lordb/Desktop/Server/NewBuildTest/spigot-1.18.1.jar”; Runtime.getRuntime ().exec (exec); } catch …
Visit the Minecraft Server website and download the Minecraft server version of the Minecraft Vanilla JAR file to your computer. When you download the Minecraft Server jar, it will be saved by default to your Downloads folder.
Once you have the Server.jar copied, return to your desktop and open the server folder we made earlier. Then right click in the empty folder and paste in the copied .jar file. Now let’s connect to the server. The very first step is to run our batch file to launch the server. With the server launched, open your Minecraft launch page and make sure you load the version of …
On Linux and macOS this should already be set up but on Windows you might have to tinker with the PATH environment variable. Download minecraft_server.1.18.2.jar and run it with the following command: java -Xmx1024M -Xms1024M -jar minecraft_server.1.18.2.jar nogui.
Related Questions
How do I run a JAR file in Minecraft?
Execute the server for the first time by running the following command at the command prompt from the directory the .JAR file is located in, of course: Windows: java -Xmx1024M -Xms1024M -jar minecraft_server.1.7.10.jar nogui The above commands will execute the Minecraft server JAR file.
How do I set up a Minecraft server in Java?
You can name it “Minecraft Server”. Drag over or copy and paste the .jar file into the Minecraft Server folder. While you have the file browser open, open command prompt from the start menu. You can check if Java is installed in command prompt by typing without quotes “java -version”.
How do I run a Minecraft server in Linux terminal?
Open the Terminal: Applcations > Accessories > Terminal. and then change directories to where the Minecraft server jar is located with the cd command. Then type in java -jar minecraft_server.jar You can specify the initial and maximum memory allocation pool for the Java Virtual Machine by adding -Xms500M and -Xmx1G between java and -jar.
What version of Java do I need to run a Minecraft?
We’d always recommend using the latest version of java for the best performance and you should keep java you are running up to date. Visit the Minecraft Server website and download the Minecraft server version of the Minecraft Vanilla JAR file to your computer.