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
| Distribution | URL | Best for |
|---|---|---|
| Eclipse Temurin | adoptium.net | Most developers β widest community, most platforms |
| Amazon Corretto | aws.amazon.com/corretto | AWS-based workloads, long patch support |
| Microsoft OpenJDK | learn.microsoft.com/java/openjdk/download | Azure / Windows environments, winget integration |
| Azul Zulu | azul.com/downloads | Alpine Linux (musl), wide version archive |
| Oracle JDK | oracle.com/java/technologies/downloads | Only 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/.rpmvia package manager, or.tar.gzfor manual install
Use the package manager or installer format whenever possible β it handles PATH and JAVA_HOME for you.