Skip to content

Commit

Permalink
Enable jdk21 on an m1 mac
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Sep 14, 2024
1 parent 25518de commit eeb2171
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/enable-jdk21-m1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash


VERSION="21.0.2"

if [ ! -e jdk-$VERSION ]; then
echo "Downloading JDK $VERSION"
wget https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz
tar -xvzf openjdk-21.0.2_macos-aarch64_bin.tar.gz
rm openjdk-21.0.2_macos-aarch64_bin.tar.gz
fi

export PATH=$(pwd)/jdk-$VERSION/bin:$PATH
export JAVA_HOME=$(pwd)/jdk-$VERSION/

0 comments on commit eeb2171

Please sign in to comment.