OpenJDK distributors excluding Oracle

  • OpenJDK: The open-source implementation of the Java Platform, providing core libraries and APIs. It serves as the basis for many Java distributions.

  • AdoptOpenJDK: A community-driven effort to provide free, open-source OpenJDK binaries for a variety of platforms. It is now part of the Eclipse Adoptium project.

  • Amazon Corretto: Amazon distributes a no-cost, multiplatform, production-ready distribution of OpenJDK, with long-term support.

  • Azul Systems: Provides Zulu OpenJDK builds, which are tested, certified, and fully compliant OpenJDK distributions.

  • Microsoft: Offers OpenJDK builds for Windows, macOS, and Linux, providing binaries through their Azure and other platforms.

Linux (CentOS/RHEL using yum)

  1. Find the OpenJDK version you want to install(we use Open JDK distribution).

      sudo yum search openjdk
      
  2. Install OpenJDK JDK:

      sudo yum install -y java-21-openjdk-devel
      
  3. Verify Installation:

      java -version
      
  4. Shift between versions(like javac)

      update-alternatives --config javac
      

Linux (Ubuntu/Debian using apt)

  1. Find the OpenJDK version you want to install(we use Open JDK distribution).

      sudo apt search openjdk
      
  2. Install OpenJDK:

      sudo apt install -y openjdk-21-jdk
      
  3. Verify Installation:

      java -version
      
  4. Shift between versions(like javac)

      update-alternatives --config javac
      

macOS

  1. Find the OpenJDK version you want to install(we use Open JDK distribution).

      brew search openjdk
      
  2. Install Java using Homebrew:

      brew install openjdk@21
      
  3. Set Java Home (Optional):

      echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.zshrc
    source ~/.zshre
      
  4. Verify Installation:

      java -version
      

Windows

  1. Download JDK:

  2. Run Installer:

    • Run the downloaded installer and follow the installation wizard instructions.
  3. Set Java Environment Variables (Optional):

    • Set JAVA_HOME to the JDK installation directory.
    • Update PATH to include the JDK’s bin directory.
  4. Verify Installation:

    • Open Command Prompt and type:
      java -version