Install Java JDK on Linux or MacOS
This article explains the steps involved to install Java JDK on Linux or MacOS. Get the architecture of the Machine from Terminal using: uname -m Create a directory for installation: mkdir -p $HOME/tools/java Download latest java LTS binary: Download java 25 binary for Linux / Mac OS operating system with the correct architecture type to directory $HOME/tools/java Download URL https://adoptium.net/en-GB/temurin/releases?mode=filter&os=any&arch=any Extract and rename java binary: find $HOME/tools/java -type f -name OpenJDK25*.tar.gz | xargs -I {} mv {} $HOME/tools/java/OpenJDK25.tar.gz tar -xvzf $HOME/tools/java/OpenJDK25.tar.gz -C $HOME/tools/java find $HOME/tools/java -type d -name jdk-25* | xargs -I {} mv {} $HOME/tools/java/jdk-25 Make the extracted binaries as executables: chmod a+rwx -R $HOME/tools/java/* Identify the shell used in the Terminal using: echo $SHELL Configure PATH: Add the following lines to $HOME/.bash_profile or $HOME/.bashrc or $HOME/.zprofile based on ...