# Java Installation (Debian 10/11)

## Java 8

Falls Sie gerne Java-8 installieren möchten, führen Sie bitte folgende Befehle durch:

```
apt install apt-transport-https ca-certificates wget dirmngr gnupg software-properties-common -y
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -
add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
apt update
apt install adoptopenjdk-8-hotspot -y
```

## Java 17

```
apt install gnupg curl dirmngr nano unzip -y
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/java.list
apt update
apt install oracle-java17-installer -y
```

## Auswahl der Version

Wenn du mehrere Versionen installiert hast, kannst du die standartversion mit dem folgenden Befehl auswählen

```
sudo update-alternatives --config java
```


---

# Agent Instructions: 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://wiki.primeapi.de/permissionssystem/java-installation-debian-10-11.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.
