Where to Download Java (Safe, Free Sources)

Download Java from an official OpenJDK vendor β€” not from random mirror sites. The four most trusted free sources are Adoptium (Temurin), Amazon Corretto, Microsoft Build of OpenJDK, and Azul Zulu. All are free, all are safe, and all receive the same security patches as Oracle JDK.

Official download URLs

DistributionURLBest for
Eclipse Temurinadoptium.netMost developers β€” widest community, most platforms
Amazon Correttoaws.amazon.com/correttoAWS-based workloads, long patch support
Microsoft OpenJDKlearn.microsoft.com/java/openjdk/downloadAzure / Windows environments, winget integration
Azul Zuluazul.com/downloadsAlpine Linux (musl), wide version archive
Oracle JDKoracle.com/java/technologies/downloadsOnly if your org has an Oracle Java SE subscription

Which version should you download?

Pick a Long-Term Support (LTS) release unless you have a specific reason for a non-LTS build:

  • Java 21 LTS β€” the most-adopted LTS, virtual threads, records, pattern matching. Recommended for new projects.
  • Java 17 LTS β€” sealed classes, records. Widely deployed, still fully supported.
  • Java 25 LTS β€” newest LTS (September 2025). Use if you need value objects preview or structured concurrency.
  • Java 11 LTS β€” end of free support for most vendors in 2027. Migrate to 17 or 21.

Avoid these sources

  • FileHippo, Softonic, CNET Downloads β€” these wrap installers in adware or bundle third-party software.
  • Old SourceForge Java projects β€” outdated and unofficial.
  • Any URL that isn't the vendor's official domain (oracle.com, adoptium.net, azul.com, aws.amazon.com, microsoft.com).

Download via package manager (recommended)

Windows (winget):

winget install EclipseAdoptium.Temurin.21.JDK

macOS (Homebrew):

brew install openjdk@21

Ubuntu/Debian:

sudo apt install openjdk-21-jdk

Fedora/RHEL:

sudo dnf install java-21-openjdk-devel

Package managers pull from their own trusted repositories and keep the JDK up to date with system upgrades.

What file format to download

  • Windows: .msi (sets JAVA_HOME automatically) or .zip (manual setup)
  • macOS: .pkg (clicks to install) or .tar.gz (manual)
  • Linux: .deb / .rpm via package manager, or .tar.gz for manual install

Use the package manager or installer format whenever possible β€” it handles PATH and JAVA_HOME for you.