File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,19 @@ install_jdk() {
5
5
# install jdk "manually"
6
6
# depending on os, might want to do something like `apt remove default-jre openjdk-*-jre-*`
7
7
cd /opt
8
+ # in order to have a stable download we must use the latest-1 version as that is the most recent in the "archive"
8
9
baseurl=https://download.oracle.com/java/21/archive/
9
- version=21.0.8
10
+ major_version=21
11
+ baseurl=" https://download.oracle.com/java/${major_version} /archive/"
12
+ version=21.0.7
10
13
if uname -m | grep aarch64; then
11
14
tarball=jdk-${version} _linux-aarch64_bin.tar.gz
12
- # checksum from https://download.oracle.com/java/21/latest /jdk-21_linux -aarch64_bin.tar.gz.sha256
13
- sha=708064ee3a1844245d83be483ff42cc9ca0c482886a98be7f889dff69ac77850
15
+ # checksum from https://download.oracle.com/java/${major_version}/archive /jdk-${version}_linux -aarch64_bin.tar.gz.sha256
16
+ sha=47372cfa9244dc74ec783a1b287381502419b564fbd0b18abc8f2d6b19ac865e
14
17
else
15
18
tarball=jdk-${version} _linux-x64_bin.tar.gz
16
- # checksum from https://download.oracle.com/java/24 /latest/jdk-24_linux -x64_bin.tar.gz.sha256
17
- sha=5f9f7c4ca2a6cef0f18a27465e1be81bddd8653218f450a329a2afc9bf2a1dd8
19
+ # checksum from https://download.oracle.com/java/${major_version} /latest/jdk-${version}_linux -x64_bin.tar.gz.sha256
20
+ sha=267b10b14b4e5fada19aca3be3b961ce4f81f1bd3ffcd070e90a5586106125eb
18
21
fi
19
22
wget --quiet " $baseurl$tarball "
20
23
echo " $sha $tarball " | sha256sum --check -
You can’t perform that action at this time.
0 commit comments