![]() |
VOOZH | about |
| Author(s) | |
|---|---|
| Platform(s) | π Windows π macOS π Linux and other platforms that support running a JVM |
| Written in | π Java Java |
| Latest version |
|
| Release date | June 8, 2009 |
| Size |
|
| License | EULA |
| Source available | Partial |
| Links |
Downloads |
{
"title": "server.jar",
"rows": [
{
"field": "\n* (link to File:Mojang Studios logo.svg article, displayed as x20px|link=Mojang Studios) (link to Mojang Studios article, displayed as Mojang Studios)",
"label": "Author(s)"
},
{
"field": "(link to File:Windows.svg article, displayed as x20px|Windows|link=wikipedia:Microsoft Windows)<span class=\"os-icon\">(link to File:macOS.svg article, displayed as x10px|macOS|link=wikipedia:macOS|class=darkmode-invert)</span><span class=\"os-icon\">(link to File:Tux.svg article, displayed as x20px|Linux|link=wikipedia:Linux)</span> and other platforms that support running a JVM",
"label": "Platform(s)"
},
{
"field": "(link to File:Java.svg article, displayed as x20px|Java|link=wikipedia:Java (programming language)) (link to wikipedia:Java (programming language) article, displayed as Java)",
"label": "Written in"
},
{
"field": "\n* '''Release''': (link to Java Edition_26.2 article, displayed as 26.2)\n* '''Snapshot''': (link to Java Edition_26.3 Snapshot 1 article, displayed as 26.3 Snapshot 1)",
"label": "Latest version"
},
{
"field": "June 8, 2009",
"label": "Release date"
},
{
"field": "\n* Only JAR: β 54 MiB\n* With initial generated data: β 114 MiB",
"label": "Size"
},
{
"field": "[https://www.minecraft.net/en-us/eula EULA]",
"label": "License"
},
{
"field": "Partial",
"label": "<span style=\"white-space:normal\">Source available</span>"
},
{
"field": "\n* [https://www.minecraft.net/en-us/download/server Website] \n'''Downloads'''\n* [https://piston-data.mojang.com/v1/objects/823e2250d24b3ddac457a60c92a6a941943fcd6a/server.jar 26.2]\n* [https://piston-data.mojang.com/v1/objects/4d9ebd8b9dc87345ab770ceaf43fbeaeab05903f/server.jar 26.3 Snapshot 1]",
"label": "Links"
}
],
"invimages": [],
"images": [
"Server.jar GUI.png",
"Server.jar CLI.png"
]
}
server.jar is an executable JAR file containing the program and resources of the Java Edition server software. It is distributed by Mojang Studios and can be downloaded free of charge.
The server.jar file can be opened with a file archiving program that supports ZIP files. It contains the program and default resources shared with the client.jar, but excluding client-specific code, like rendering and audio output, GUI, models, and others; both are identical in gameplay. It is intended to host a dedicated environment for multiplayer, being able to launch a headless[a] version of the game. The client.jar file also provides an internal server used for playing singleplayer worlds that can be opened into LAN.
The archive also contains a version.json file, which provides the game's version information, including the version ID (e.g., 26.2), data version, pack version, protocol version, and others.
Upon running the server.jar, libraries from the contained META-INF directory are extracted into the working directory. This behavior can further be configured by a different main class available on the JAR file, see Β§ Bundler options.
The following contents are generated by default when no option is specified:
eula.txt) is accepted.client.jar without client-related files).server.properties by level-name option.Files are generated on the first run if not present in the same directory as server.jar.
If an eula.txt file does not exist on startup, it is generated with default content and the program exits. The default content is as follows:
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://aka.ms/MinecraftEULA). #[Generation time] eula=false
Much like server.properties, it follows the .properties syntax. eula has to be set to true for the server to start.
The server software has both a command-line interface and a basic graphical user interface.
The command-line interface outputs logs to the standard output, and accepts newline delimited input from the standard input, which is executed by the server as commands (similar to being executed by command blocks, but with the highest privilege level). Running a command in the interface does not require / at the beginning of the line.
The GUI appears if the platform supports windowing and the --nogui or nogui option is not provided. It is written in Abstract Window Toolkit (AWT) and features three sections:
| Option | Description |
|---|---|
--bonusChest |
Enable the bonus chest when generating a world for the first time. |
--demo |
Enable demo mode. Shows the players a demo pop-up, and players cannot break or place blocks after the 5 in-game days demo time has expired, even if they have purchased the game. |
--eraseCache |
Erase cached data like light levels and biome data, which must then be regenerated. Equivalent to the "Erase Cached Data" option of "Optimize World" in World Options on the client. |
--forceUpgrade |
Optimize the world by upgrading the level data to the latest format. Once the world is optimized, it is no longer compatible with older level formats. Equivalent to the "Optimize World" option in World Options on the client. |
--help |
Print available options without starting the server. |
--initSettings |
Initialize server.properties and eula.txt without starting the server. If either file is missing, it creates them with default values.
|
--jfrProfile |
Initialize Java Flight Recorder profiler for the server. While the server is running, the profiler can be opened using an external tool or software, such as VisualVM. It enables monitoring of the server's CPU, memory, and threads usage. Additionally, it saves a jfr file on the debug folder of the server.jar, containing JVM and operating system events, and several Minecraft-related custom events. Further information on Commands/jfr Β§ Usage.
|
--nogui |
Disable the GUI when launching the server. |
nogui |
Legacy alias of --nogui.
|
--pidFile <path> |
Create a text file at path containing the process identifier (PID) of the server process while it's running.
|
--port <port> |
Specify the TCP port to use instead of the value in server.properties.
|
--recreateRegionFiles |
Optimize the world similar to --forceUpgrade, but also rewrites all the chunks independently of whether they have been upgraded, creating fresh and defragmented region files.[1] Using this option after changing region-file-compression in server.properties will recompress all region files in the new format.
|
--safeMode |
Ensure the server only loads the vanilla data pack. |
--serverId <id> |
Specify the "Server Id" string used in the crash report details. |
--universe <path> |
Specify the path to the directory level-name in server.properties is relative to. If empty, it is relative to the working directory.
|
--world <name> |
Specify the world name to use instead of the level-name value in server.properties.
|
The server.jar introduces an extra layer of code (called the "bundler") for extracting runtime libraries. This allows the main class to be specified at startup using system properties.
The following system properties can change the startup behavior:[2]
bundlerMainClass: Specifies the main class to start. If not specified, the main class defined on META-INF/main-class file in the server.jar (usually net.minecraft.server.Main) is used instead. There are three available main classes:
net.minecraft.server.Main: Used for launching the Minecraft server.net.minecraft.data.Main: Used as entry point for data generators[vg].net.minecraft.gametest.Main: Used as an entry point for the GameTest framework, which provides its own command-line options.[3]"") is entered, it results in Empty main class specified, exiting.libraries and versions folders, even for unspecified option.bundlerRepoDir: Specifies the working directory for the resources extraction. If not specified, the current working directory is used instead.System properties are specified like -D<property>, which property is the name defined above. They must be specified for the JVM program in the command-line, placed before -jar parameter (otherwise it will be specified for the server.jar file, which is invalid), e.g. java -DbundlerMainClass="net.minecraft.data.Main" -jar server.jar is a valid execution.
| Java Edition Classic | |||||||
|---|---|---|---|---|---|---|---|
| server 1.2 | The earliest archived version by the community (Omniarchive). | ||||||
Server.properties options at this time include port, server-name, max-players, motd, public. | |||||||
| Java Edition Alpha | |||||||
| 1.0.15 | server.jar was released to the public for Survival multiplayer server. | ||||||
| Java Edition | |||||||
| 1.0.0 | Beta 1.9 Prerelease 4 | Added debug, enable-query, enable-rcon, query.port, rcon.password and rcon.port. | |||||
| This marked the first introduction of Query and Remote console (RCON) protocols. | |||||||
| 1.0.1 | server.jar was updated in a server-only release.
| ||||||
Fixed Invalid server key error when logging in.
| |||||||
Fixed Null pointer exception error when logging in. | |||||||
| 1.3.1 | 12w18a | The server logic was separated from the client, making singleplayer effectively run an internal server. | |||||
Added command-line arguments: --demo, --port, --singleplayer, --universe, and --world. The legacy nogui argument remained functional. | |||||||
| 12w19a | Added the --bonusChest command-line argument. | ||||||
| 12w21a | Removed server.jar dependency in singleplayer. | ||||||
| 1.16 | 20w20b | The dedicated server main class was changed from net.minecraft.server.MinecraftServer to net.minecraft.server.Main. | |||||
| 20w22a | Added the --safeMode command-line argument. | ||||||
| 1.18 | 21w37a | Added the --jfrProfile command-line argument. | |||||
| 21w39a | Changed the file structure of server.jar. Individual libraries are now bundled separately instead of being merged into a single archive.
| ||||||
Server startup now unpacks libraries into a directory configured by the bundlerRepoDir property (defaults to the working directory).
| |||||||
The main class can be changed using the bundlerMainClass property. | |||||||
| 1.18-pre3 | Starting server.jar with an empty bundlerMainClass property now validates and extracts files, then exits. | ||||||
| 1.20 | 23w06a | Added the --pidFile command-line argument. | |||||
| 1.20.2 | 23w31a | Removed the --singleplayer command-line argument. | |||||
| 1.20.5 | 24w04a | Added the --recreateRegionFiles command-line argument.
| |||||
Added the region-file-compression setting to server.properties. | |||||||
| 1.21.4 | 24w45a | The data generator entry point (net.minecraft.data.Main) no longer generates the assets directory.
| |||||
The --client command-line option was removed for the data generator entry point. | |||||||
| 1.21.5 | 25w03a | Added the net.minecraft.gametest.Main entry point for running automated game tests from server.jar.
| |||||
Added associated command-line arguments for the gametest entry point: --help, --packs, --report, --tests, --universe, and --verify. | |||||||
| 1.21.9 | 25w35a | Added the Minecraft Server Management Protocol (MSMP). | |||||
| 25w37a | MSMP clients must authenticate to access the API. | ||||||
| MSMP TLS is enabled by default. | |||||||
Issues relating to "Server.jar", "Server jar", or "Java server" are maintained on the bug tracker. Issues should be reported and viewed there.
server.jar will launch with a basic GUI by default, but can be disabled with --nogui option.