> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/ask/flat/chapter-19-games-scientific-computing-and-professional-tools/di-19.3-jie-wo-de-shi-jie-minecraft.md).

# 19.3 Minecraft

Minecraft is a sandbox game developed in Java. Different versions have specific JDK version requirements (1.20.5+ requires Java 21). This section covers OpenJDK installation and launcher configuration on FreeBSD.

## Installing OpenJDK

Different Minecraft versions require different JDK versions:

| Minecraft Version | Required JDK Version |
| ----------------- | -------------------- |
| 1.17              | Java 16              |
| 1.18 to 1.20.4    | Java 17              |
| 1.20.5 and above  | Java 21              |

Testing has confirmed that JDK 21 runs the latest version of Minecraft normally.

Install OpenJDK 21 using pkg:

```sh
# pkg install openjdk21
```

Or install OpenJDK 21 using Ports:

```sh
# cd /usr/ports/java/openjdk21/
# make install clean
```

## Minecraft Client

There are two common launchers available on FreeBSD: HMCL and Prism Launcher. Prism Launcher is available through FreeBSD Ports, while HMCL can only be run by manually downloading the `.jar` file.

### HMCL

HMCL (Hello Minecraft! Launcher) is a Minecraft launcher developed in Java that supports multi-version management and mod loading.

#### Configuring HMCL

Before configuring the launcher, you need to obtain the installation file first.

Download the latest release from the [releases](https://github.com/HMCL-dev/HMCL/releases) page.

Open a terminal and run the command to launch the HMCL launcher JAR file using Java:

```sh
$ java -jar HMCL*.jar
```

Not all Minecraft versions are supported; for compatibility details, please refer to the [Platform Support Status](https://github.com/HMCL-dev/HMCL/blob/main/docs/PLATFORM.md) document. The remaining settings are platform-independent; key configurations include Java path settings, game directory selection, and memory allocation.

#### Launching the Game with HMCL

For specific steps on launching the game with HMCL, please refer to the screenshots below.

![Playing Minecraft on FreeBSD](/files/QQy9actUAwTBvAnTRf61)

![Playing Minecraft on FreeBSD](/files/ucMcZUSBrdHIq8pmcYiA)

### Prism Launcher

Prism Launcher is an open-source launcher developed using C++ and the Qt framework. This launcher disables offline login by default and restricts [bypass methods](https://github.com/antunnitraj/Prism-Launcher-PolyMC-Offline-Bypass), and is recommended only for licensed users.

#### Installing Prism Launcher

Install Prism Launcher using pkg:

```sh
# pkg install prismlauncher
```

You can also install Prism Launcher using Ports:

```sh
# cd /usr/ports/games/prismlauncher/
# make install clean
```

#### Configuring Prism Launcher

Pay attention to desktop environment compatibility during configuration.

If using the KDE desktop environment, you need to update third-party packages to the latest version. This is because the KDE desktop environment requires a specific Qt version, and the Qt libraries that Prism Launcher depends on must be consistent with the system libraries.

```sh
# pkg upgrade
```

Otherwise, it may fail to start, and the terminal will display error messages about incompatible Qt library versions or missing symbols.

Click to launch the program:

![Running Minecraft on FreeBSD](/files/rJcmWxlPjH9ZvwHtJV3Z)

This is the language setting, which supports Chinese by default.

![Running Minecraft on FreeBSD](/files/fyvP9QmTIwjGzTRDTvwE)

This sets the Java version; keep the default settings.

![Running Minecraft on FreeBSD](/files/kKfpDftAO9WE6GDvdiFA)

Appearance settings; keep the default settings.

![Running Minecraft on FreeBSD](/files/43MHlEAPK5dPiN4k3xRl)

#### Launching Minecraft with Prism Launcher

After launching the program, you can see that Prism Launcher supports Chinese, but requires a licensed login.

![Running Minecraft on FreeBSD](/files/GTUB2etb3CNcE9ykzH7L)

After logging in, download the latest version of the game.

> **Note**
>
> A Minecraft licensed account is required to log in to the game. You can [purchase](https://www.minecraft.net/en-us/store/minecraft-java-bedrock-edition-pc) the game.

![Running Minecraft on FreeBSD](/files/x7sCbbThwWGh218i0yCJ)

Enter the Minecraft game.

![Running Minecraft on FreeBSD](/files/OEgidqfqpVPhCIh1UAjd)

Enter the game screen.

![Running Minecraft on FreeBSD](/files/0x6QcUYFNvp4rz0QfJ0K)

## References

* Mojang Studios. Minecraft: Java Edition 1.20.5\[EB/OL]. \[2026-04-17]. <https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-5>. Minecraft 1.20.5 and later require Java 21 and a 64-bit operating system.
* HMCL-dev. Hello Minecraft! Launcher\[EB/OL]. \[2026-04-17]. <https://github.com/HMCL-dev/HMCL>. HMCL is an open-source cross-platform Minecraft launcher released under the GPLv3 license.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/ask/flat/chapter-19-games-scientific-computing-and-professional-tools/di-19.3-jie-wo-de-shi-jie-minecraft.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
