Skip to content

Commit e6918e3

Browse files
authored
Update installation instructions to install Java 21 (exercism#2543)
* Update installation instructions to install Java 21 (exercism#2368) * Use Temurin JDK 21 Chocolatey package on Windows * Install a specific version on macOS See also: https://adoptium.net/installation/
1 parent 18e3230 commit e6918e3

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

docs/INSTALLATION.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Open an administrative command prompt. (If you need assistance opening an admin
3131
2. Install the JDK:
3232
3333
```batchfile
34-
C:\Windows\system32> choco install openjdk11
34+
C:\Windows\system32> choco install temurin21
3535
...
3636
C:\Windows\system32> refreshenv
3737
...
@@ -62,17 +62,16 @@ Below are instructions for install using the most common method - using Homebrew
6262
```sh
6363
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
6464
```
65-
66-
2. Tap the [Homebrew Cask](https://caskroom.github.io/) — this allows us to install pre-built binaries like the JDK.
65+
2. Tap the [Homebrew Cask](https://github.com/Homebrew/homebrew-cask-versions) — this allows us to install a specific JDK version.
6766
6867
```
69-
$ brew tap adoptopenjdk/openjdk
68+
$ brew tap homebrew/cask-versions
7069
```
7170
7271
3. Install the JDK:
7372
7473
```
75-
$ brew install --cask adoptopenjdk11
74+
$ brew install --cask temurin21
7675
```
7776
7877
4. Install Gradle:
@@ -98,7 +97,7 @@ Below are instructions for install using the package manager of your distro. If
9897
9998
If you are using Debian or its derivatives (like Ubuntu), use APT:
10099
101-
*(verified on: Ubuntu 14, 16 and 18)*
100+
*(verified on: Ubuntu 20.04 and 22.04)*
102101
103102
1. Install the JDK:
104103
@@ -107,7 +106,7 @@ If you are using Debian or its derivatives (like Ubuntu), use APT:
107106
$ sudo apt-get install software-properties-common
108107
$ sudo add-apt-repository ppa:openjdk-r/ppa
109108
$ sudo apt-get update
110-
$ sudo apt-get install openjdk-11-jdk
109+
$ sudo apt-get install openjdk-21-jdk
111110
```
112111
113112
2. Install Gradle:
@@ -126,17 +125,17 @@ To get started, see "[Running the Tests](https://exercism.org/docs/tracks/java/t
126125
127126
## Other Linux distributions
128127
129-
There are a lot of ways to install Jdk 11, but one of the easiest ways is to use SDKMAN, which lets you install
130-
both OpenJdk11 and the latest Gradle with ease. Use the following steps:
128+
There are a lot of ways to install JDK 21, but one of the easiest ways is to use SDKMAN, which lets you install
129+
both OpenJDK 21 and the latest Gradle with ease. Use the following steps:
131130
132131
1. Install SDKMAN:
133132
```sh
134133
$ curl -s "https://get.sdkman.io" | bash
135134
```
136135
(if that doesn't work, take a look at the instructions found here: https://sdkman.io/install )
137-
1. Install openjdk11:
136+
1. Install OpenJDK 21:
138137
```
139-
$ sdk install java 11.0.2-open
138+
$ sdk install java 21.0.1-tem
140139
```
141140
1. Install Gradle:
142141
```sh
@@ -162,7 +161,7 @@ To get started, see "[Running the Tests](https://exercism.org/docs/tracks/java/t
162161
*NOTE: these instructions are intended for experienced Windows users. If you don't already know how to set environment variables or feel comfortable managing the directory structure, we highly recommend you use the Chocolatey-based install, [above](#windows).*
163162
164163
1. Install the JDK:
165-
1. Download "**OpenJDK 11 (LTS)**" from [AdoptOpenJDK](https://adoptopenjdk.net/releases.html?variant=openjdk11#x64_win) (choose **"Install JDK"**).
164+
1. Download "**OpenJDK 21 (LTS)**" from [Adoptium](https://adoptium.net/temurin/releases/?os=windows&arch=x64&package=jdk&version=21) (choose **".msi"**).
166165
- Run the installer, using all the defaults.
167166
2. Install Gradle:
168167
- Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
@@ -182,7 +181,7 @@ To get started, see "[Running the Tests](https://exercism.org/docs/tracks/java/t
182181
*NOTE: these instructions are intended for experienced macOS users. Unless you specifically do not want to use a package manager, we highly recommend using the Homebrew-based installation instructions, [above](#macos).*
183182
184183
1. Install the JDK:
185-
1. Download "**OpenJDK 11 (LTS)**" from [AdoptOpenJDK](https://adoptopenjdk.net/releases.html?variant=openjdk11#x64_mac) (choose **"Install JDK"**).
184+
1. Download "**OpenJDK 21 (LTS)**" from [Adoptium](https://adoptium.net/temurin/releases/?os=mac&package=jdk&version=21) (choose **".pkg"**).
186185
2. Run the installer, using all the defaults.
187186
2. Install Gradle:
188187
1. Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
@@ -216,7 +215,7 @@ To get started, see "[Running the Tests](https://exercism.org/docs/tracks/java/t
216215
*NOTE: these instructions are intended for experienced Linux users. Unless you specifically do not want to use a package manager, we highly recommend using the installation instructions, [above](#linux).*
217216
218217
1. Install the JDK:
219-
1. Choose your distribution and download "**OpenJDK 11 (LTS)**" from [AdoptOpenJDK](https://adoptopenjdk.net/releases.html?variant=openjdk11) (choose **"Install JDK"**).
218+
1. Choose your distribution and download "**OpenJDK 21 (LTS)**" from [Adoptium](https://adoptium.net/temurin/releases/?os=linux&package=jdk&version=21) (choose **".tar.gz"**).
220219
2. Run the installer, using all the defaults.
221220
2. Install Gradle:
222221
1. Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).

0 commit comments

Comments
 (0)