44
55This page explains how to get the software you need to use on Linux or macOS for local development.
66
7- * ` java 17 ` package or newer
7+ * ` java 21 ` package or newer
88* ` git ` installed
99* ` docker ` installed
1010
1111> Note: For contribution, you must have a ` github ` account.
1212
1313#### For Linux
1414
15- 1 . Install ` OpenJDK 17 ` package or newer:
15+ 1 . Install ` OpenJDK 21 ` package or newer:
1616
1717```
1818sudo apt update
19- sudo apt install openjdk-17 -jdk
19+ sudo apt install openjdk-21 -jdk
2020```
2121
2222* Check java version using the command ` java -version ` .
2323
2424```
25- openjdk version "17 .0.5" 2022 -10-18
26- OpenJDK Runtime Environment (build 17 .0.5+8-Ubuntu-2ubuntu120.04)
27- OpenJDK 64-Bit Server VM (build 17 .0.5+8-Ubuntu-2ubuntu120.04, mixed mode, sharing)
25+ openjdk version "21 .0.5" 2024 -10-15
26+ OpenJDK Runtime Environment (build 21 .0.5+8-Ubuntu-2ubuntu120.04)
27+ OpenJDK 64-Bit Server VM (build 21 .0.5+8-Ubuntu-2ubuntu120.04, mixed mode, sharing)
2828```
2929
30- Note: In case OpenJDK 17 is not set as your default Java, run ` sudo update-alternatives --config java ` command to list all installed Java versions.
30+ Note: In case OpenJDK 21 is not set as your default Java, run ` sudo update-alternatives --config java ` command to list all installed Java versions.
3131
3232```
3333Selection Path Priority Status
3434------------------------------------------------------------
3535* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
3636 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
3737 2 /usr/lib/jvm/java-16-openjdk-amd64/bin/java 1051 manual mode
38- 3 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1001 manual mode
38+ 3 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1021 manual mode
39+ 4 /usr/lib/jvm/java-21-openjdk-amd64/bin/java 1001 manual mode
3940
4041Press <enter> to keep the current choice[*], or type selection number:
4142```
4243
43- you can set it as the default by entering the selection number for it in the list and pressing Enter. For example, to set Java 17 as the default, you would enter "3 " and press ** Enter** .
44+ you can set it as the default by entering the selection number for it in the list and pressing Enter. For example, to set Java 21 as the default, you would enter "4 " and press ** Enter** .
4445
45462 . Install ` git ` :
4647
@@ -76,11 +77,10 @@ sudo chmod 666 /var/run/docker.sock
7677brew cask
7778```
7879
79- 3 . Install Eclipse Temurin 17 via Homebrew cask :
80+ 3 . Install openjdk 21 via Homebrew:
8081
8182``` sh
82- brew tap homebrew/cask-versions
83- brew install temurin17
83+ brew install openjdk@21
8484```
8585
86864 . Verify Installation
@@ -89,11 +89,17 @@ brew install temurin17
8989java -version
9090```
9191
92- Note: In case OpenJDK 17 is not set as your default Java, you can consider including it in your ` $PATH ` after installation
92+ Note: In case OpenJDK 21 is not set as your default Java, you can consider including it in your ` $PATH ` after installation
9393
9494``` sh
95- export PATH=" $( /usr/libexec/java_home -v 17) /bin:$PATH "
96- export JAVA_HOME=" $( /usr/libexec/java_home -v 17) "
95+ export PATH=" $( /usr/libexec/java_home -v 21) /bin:$PATH "
96+ export JAVA_HOME=" $( /usr/libexec/java_home -v 21) "
97+ ```
98+
99+ If java_home doesn't recognize homebrew installed java you can run below cmd to symlink brew installed java path to jvm
100+
101+ ``` sh
102+ sudo ln -sfn $( brew --prefix openjdk@21) /libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk
97103```
98104
99105### Tips
0 commit comments