> For the complete documentation index, see [llms.txt](https://docs.linuxgsm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.linuxgsm.com/requirements/java.md).

# Java

Some game servers require using Java Runtime Environment (JRE) such as Minecraft and Project Zomboid.

## Installation of Java Runtime Environment

If you are unsure which version to choose simply pick the default JRE.

### Debian/Ubuntu

#### JRE

To install the most up to date JRE for the distro run:

```
apt install default-jre
```

#### OpenJRE

For `openjdk`, run the following changing the version number:

```
apt install openjdk-8-jre
```

```
apt install openjdk-11-jre
```

```
apt install openjdk-16-jre
```

```
apt install openjdk-17-jre
```

### CentOS

Run the following command, changing the version number:

```
yum install java-1.8.0-openjdk
```

```
yum install java-11-openjdk
```

## JRE Availability Table

JRE Availability Table Different Distros have different versions of Java. This page will outline the different versions that are available.

| Distro               | JRE 6 | JRE 7 | JRE 8 | JRE 11         | JRE 13 | JRE 16 | JRE 17 |
| -------------------- | ----- | ----- | ----- | -------------- | ------ | ------ | ------ |
| CentOS 7             | YES   | YES   | YES   | YES            | NO     | NO     | NO     |
| CentOS 8             | NO    | NO    | YES   | YES            | NO     | NO     | NO     |
| Debian 9 "Stretch"   | NO    | NO    | YES   | YES (backport) | NO     | NO     | NO     |
| Debian 10 "Buster"   | NO    | NO    | NO    | YES            | NO     | NO     | NO     |
| Debian 11 "Bullseye" | NO    | NO    | NO    | YES            | NO     | NO     | YES    |
| Ubuntu 16.04 LTS     | NO    | NO    | YES   | NO             | NO     | NO     | NO     |
| Ubuntu 18.04 LTS     | NO    | NO    | YES   | YES            | NO     | NO     | NO     |
| Ubuntu 20.04 LTS     | NO    | NO    | YES   | YES            | YES    | YES    | YES    |

[Distrowatch](https://distrowatch.com) also contains details of JRE versions.

Further Reading <https://help.ubuntu.com/community/Java>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.linuxgsm.com/requirements/java.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
