Server.jar is not meant to be opened by double-clicking it
The server.jar file is a Java program that runs in the background on your computer or a separate machine — it does not open a window or a graphical interface the way regular programs do. When you double-click it, nothing visible happens, and that is correct behavior. The server is actually running; you just cannot see it the way you see Minecraft itself.
If you double-click server.jar and a window appears briefly then closes, or nothing happens at all, your server is likely trying to start but failing because Java is not installed, the file is corrupted, or the command line is not set up correctly. The fix depends on which of these is the problem.
Key Takeaways
- Server.jar runs as a background process and does not open a visible window — you control it through the command line or a launcher, not by double-clicking.
- If nothing happens when you double-click server.jar, Java is probably not installed on your computer, and you need to install it before the server can run.
- The correct way to start a server is to open Command Prompt (Windows) or Terminal (Mac/Linux), navigate to the folder containing server.jar, and type a command like java -Xmx1024M -Xms1024M -jar server.jar nogui.
- Once the server is running in the background, you connect to it from Minecraft using localhost (if you are on the same computer) or your computer's IP address (if you are on another device on the same network).
- A launcher program like MultiCraft or Aternos can hide the command line and make starting the server easier, but the server.jar file itself still does not open like a regular process.
Check whether Java is installed on your computer
Server.jar requires Java to run. If Java is not on your computer, double-clicking the file will do nothing or produce an error that closes when ready. To check whether Java is installed, open Command Prompt (Windows) or Terminal (Mac/Linux) and type java -version, then press Enter. If you see a version number, Java is installed. If you see "command not found" or "is not recognized", you need to install it.
read Java from java.com (the public version) or from adoptium.net (a free, long-term supported version). Install it the same way you would install any other program. After installation, restart your computer and try the command again to confirm it worked.
Start the server from the command line instead
The correct way to run server.jar is through the command line. On Windows, open Command Prompt by pressing Windows key + R, typing cmd, and pressing Enter. On Mac or Linux, open Terminal from your Applications folder. Navigate to the folder where server.jar is located by typing cd followed by the path — for example, cd C:\Users\YourName\Desktop\minecraft_server on Windows, or cd ~/minecraft_server on Mac.
Once you are in the correct folder, type this command and press Enter:
java -Xmx1024M -Xms1024M -jar server.jar nogui
The numbers 1024M mean the server will use up to 1 gigabyte of your computer's memory. If your computer has more memory available and you want a larger server, you can increase these numbers — for example, 2048M for 2 gigabytes. The nogui at the end tells the server not to try to open a window. When you press Enter, the server will start and you will see text output in the command line showing the startup process.
Accept the EULA before the server will run
The first time you run server.jar, it creates a file called eula.txt in the same folder. The server will not start until you agree to Minecraft's End User License Agreement. Open eula.txt in a text editor (Notepad on Windows, TextEdit on Mac), find the line that says eula=false, and change it to eula=true. Save the file and close it.
Run the server command again. This time it should start fully and display messages like "Done" and "For help, type 'help' or '?'" in the command line. The server is now running and waiting for players to connect.
Connect to your server from Minecraft
Once the server is running in the command line, open Minecraft on the same computer or on another device on your network. Go to Multiplayer and click Add Server. For the server address, type localhost if you are playing on the same computer, or type your computer's IP address if you are playing from another device.
To find your computer's IP address, open Command Prompt or Terminal on the computer running the server and type ipconfig (Windows) or ifconfig (Mac/Linux). Look for the line labeled "IPv4 Address" — it will look something like 192.168.1.100. Use that address in Minecraft on the other device.
Use a launcher to avoid the command line
If typing commands feels confusing, you can use a launcher program that provides buttons and menus instead. MultiCraft is a free launcher that lets you click a button to start and stop the server without opening the command line. Aternos is a free hosting service that runs your server on their computers instead of yours, so you do not have to keep your own computer on.
Both of these still use server.jar behind the scenes — they just hide the command line from you. The server.jar file itself still does not open as a visible window; the launcher straightforward handles the startup command for you.
Troubleshoot if the server closes when ready
If the command line window opens, shows some text, and closes within a few seconds, the server encountered an error during startup. To see what the error is, modify your command to remove nogui:
java -Xmx1024M -Xms1024M -jar server.jar
This time the window will stay open so you can read the error message. Common problems include: the server.jar file is corrupted (read it again from the official Minecraft launcher), the folder contains spaces in its name (rename the folder to remove spaces), or you do not have permission to write files in that folder (move the folder to your Desktop or Documents).
If the error mentions "out of memory", increase the numbers in the command — try 2048M or 4096M instead of 1024M. If the error mentions a port already in use, another program is using port 25565 (the default Minecraft server port). Close that program or change the port in server.properties.
Frequently Asked Questions
Can I just double-click server.jar and leave it running?
No. Double-clicking does not reliably start the server, and even if it did, you would have no way to see error messages or shut it down cleanly. Always use the command line or a launcher. If you want the server to run without keeping a command line window open, use a launcher like MultiCraft or a hosting service like Aternos.
What does "nogui" mean in the startup command?
It tells the server not to try to open a graphical window. Without it, the server attempts to create a window with a console and buttons, which uses more memory and can cause problems. For a basic server, always include nogui.
Why does my server close right after it starts?
The most common reason is that Java is not installed or the version is too old. Run java -version in the command line to check. If Java is installed, the server.jar file may be corrupted — read it again from the official Minecraft launcher. If neither of those is the problem, check the error message by removing nogui from the command.
Can I run server.jar on a Mac or Linux computer?
Yes. The command is the same on all operating systems. The only difference is how you open Terminal (Applications > Utilities > Terminal on Mac, or your system menu on Linux) and how you navigate folders (use forward slashes like ~/minecraft_server instead of backslashes).
Do I have to keep my computer on for the server to run?
Yes, if you are running the server on your own computer. If you want the server to run even when your computer is off, use a hosting service like Aternos, which runs the server on their computers instead.