From 2f94facf98db64da17156b86f77d71a4d6c6e933 Mon Sep 17 00:00:00 2001 From: Potothingi <108602622+Potothingi@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:03:32 +0900 Subject: [PATCH] Java 21 --- docs/misc/java-install.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/misc/java-install.md b/docs/misc/java-install.md index 9e5a2ecdb..5de23aa70 100644 --- a/docs/misc/java-install.md +++ b/docs/misc/java-install.md @@ -1,6 +1,6 @@ --- title: Installing or Updating Java -description: How to install or update to Java 17 on Linux (apt/rpm), Windows, or Mac. +description: How to install or update to Java 21 on Linux (apt/rpm), Windows, or Mac. toc_max_heading_level: 5 --- @@ -31,7 +31,7 @@ previous hostile licensing. ### Ubuntu/Debian -Installing Java 17 on Debian-based Linux distributions is very simple. First, ensure your system has +Installing Java 21 on Debian-based Linux distributions is very simple. First, ensure your system has all required tools to successfully install Java. ```bash @@ -46,18 +46,18 @@ curl https://apt.corretto.aws/corretto.key | sudo apt-key add - sudo add-apt-repository 'deb https://apt.corretto.aws stable main' ``` -Then, install Java 17 and other dependencies using the following command: +Then, install Java 21 and other dependencies using the following command: ```bash sudo apt-get update -sudo apt-get install -y java-17-amazon-corretto-jdk libxi6 libxtst6 libxrender1 +sudo apt-get install -y java-21-amazon-corretto-jdk libxi6 libxtst6 libxrender1 ``` Proceed to [verify your installation](#verifying-installation). ### RPM-based -To install Java 17 on CentOS, RHEL, Fedora, openSUSE, SLES, or any other RPM-based Linux +To install Java 21 on CentOS, RHEL, Fedora, openSUSE, SLES, or any other RPM-based Linux distribution, execute the following commands depending on your package manager. Once you have finished, precede to [verify your installation](#verifying-installation). @@ -68,7 +68,7 @@ DNF is used on Fedora, CentOS/RHEL 7+, and related distributions. ```bash sudo rpm --import https://yum.corretto.aws/corretto.key sudo curl -Lo /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo -sudo dnf -y install java-17-amazon-corretto-devel +sudo dnf -y install java-21-amazon-corretto-devel ``` #### Zypper @@ -78,7 +78,7 @@ Zypper is used on openSUSE, SLES, and related distributions. ```bash sudo zypper addrepo https://yum.corretto.aws/corretto.repo sudo zypper refresh -sudo zypper install java-17-amazon-corretto-devel +sudo zypper install java-21-amazon-corretto-devel ``` #### YUM @@ -88,14 +88,14 @@ YUM is used on older releases of CentOS/RHEL, and excessively old releases of Fe ```bash sudo rpm --import https://yum.corretto.aws/corretto.key sudo curl -Lo /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo -sudo yum -y install java-17-amazon-corretto-devel +sudo yum -y install java-21-amazon-corretto-devel ``` ## Windows 10 & 11 If you're on Windows 10 or 11, installing Java is just like installing any other program. Download the Amazon Corretto installer from -[their website](https://corretto.aws/downloads/latest/amazon-corretto-17-x64-windows-jdk.msi). +[their website](https://corretto.aws/downloads/latest/amazon-corretto-21-x64-windows-jdk.msi). Once you have run the installer, it is safe to click "next" through the whole process. No additional bloatware or toolbars will be installed, and all the required features are enabled out of the box. @@ -109,7 +109,7 @@ If you're on macOS, the best way to manage Java installations is with a tool cal terminal run the following command: ```bash -brew install openjdk@17 +brew install openjdk@21 ``` Once this command has completed, continue to [verify your installation](#verifying-installation). @@ -138,7 +138,7 @@ The Verifying Installation section does not apply for Pterodactyl. ## Verifying Installation -Now that you have installed Java 17, run this command in your terminal to ensure the process was +Now that you have installed Java 21, run this command in your terminal to ensure the process was successful. ```bash @@ -146,13 +146,13 @@ java -version ``` The output should be similar to this. The important parts to look out for is that it starts with -`openjdk 17` and contains `64-Bit` in the last line. If the output you get is similar to +`openjdk 21` and contains `64-Bit` in the last line. If the output you get is similar to `java: command not found`, try creating a new terminal session. ``` -openjdk 17 2021-09-14 LTS -OpenJDK Runtime Environment Corretto-17.0.0.35.1 (build 17+35-LTS) -OpenJDK 64-Bit Server VM Corretto-17.0.0.35.1 (build 17+35-LTS, mixed mode, sharing) +openjdk version "21" 2023-09-19 LTS +OpenJDK Runtime Environment Corretto-21.0.0.35.1 (build 21+35-LTS) +OpenJDK 64-Bit Server VM Corretto-21.0.0.35.1 (build 21+35-LTS, mixed mode, sharing) ``` If your installation has failed, do not hesitate to reach out in the `#paper-help` channel of our