How to Download Java: A Complete Guide for Every Platform
Java remains one of the most widely used programming languages and runtime environments in the world. Whether you need it to run a specific application, develop software, or support a school or work project, knowing how to download and install Java correctly makes a real difference — because the version and edition you need depends heavily on what you're actually trying to do.
What Is Java, and Why Might You Need to Download It?
Java comes in two distinct forms that serve very different purposes:
- Java Runtime Environment (JRE) — This is what most everyday users need. It lets your computer run programs built with Java, but doesn't give you tools to write or compile Java code yourself.
- Java Development Kit (JDK) — This includes the JRE plus compilers and tools for building Java applications. Developers, students learning to code, and anyone working with Java source code needs this version.
Confusing the two is one of the most common missteps. If you're just trying to get a Java-based game or business app to run, you need the JRE. If you're writing Java code, you need the JDK.
Who Distributes Java Now?
This is where things get a little more complicated than they used to be. Java was originally developed by Sun Microsystems, which Oracle later acquired. Today, there are multiple legitimate sources for Java:
| Source | Best For | License Type |
|---|---|---|
| Oracle JDK | Enterprise and commercial use | Free for personal/dev; paid for commercial production use |
| OpenJDK | Open-source projects, general use | Free and open-source |
| Amazon Corretto | AWS environments and free long-term support | Free |
| Adoptium (Eclipse Temurin) | Broad compatibility, community-supported | Free and open-source |
| Microsoft Build of OpenJDK | Azure and Windows development environments | Free |
For most personal users and learners, OpenJDK or Adoptium Temurin are commonly recommended starting points. Oracle's JDK is widely used in enterprise settings, but its licensing terms have evolved — Oracle's license requires a paid subscription for commercial production use beyond certain versions.
How to Download Java on Windows
- Visit the official source of your chosen Java distribution (Oracle at oracle.com/java, or Adoptium at adoptium.net, for example).
- Select the appropriate JDK or JRE version for your needs.
- Choose Windows as your operating system and select the correct architecture — most modern PCs use x64.
- Download the
.exeor.msiinstaller file. - Run the installer and follow the on-screen prompts.
- After installation, open Command Prompt and type
java -versionto confirm it installed correctly.
🖥️ Windows users should also check whether their system is 32-bit or 64-bit before downloading — running a 64-bit JDK on a 32-bit system won't work.
How to Download Java on macOS
- Go to your chosen Java distribution's download page.
- Select macOS and choose the correct chip type — x64 for Intel Macs, or AArch64/ARM64 for Apple Silicon (M1, M2, M3, and later chips).
- Download the
.dmgor.pkginstaller. - Open the file and follow the installation steps.
- Open Terminal and run
java -versionto verify the installation.
Getting the chip architecture right matters here. Installing an Intel-native JDK on an Apple Silicon Mac may work through Rosetta 2 emulation, but native ARM builds tend to perform better and are the preferred choice on M-series hardware.
How to Download Java on Linux
Linux distributions often have Java available directly through their package managers, which is the most straightforward path for most users:
- Ubuntu/Debian:
sudo apt install default-jdk - Fedora/RHEL:
sudo dnf install java-latest-openjdk - Arch Linux:
sudo pacman -S jdk-openjdk
Alternatively, you can download a tarball (.tar.gz) directly from OpenJDK or Adoptium and configure environment variables manually — a common approach when you need a specific version not available in your distribution's repositories.
Which Java Version Should You Install?
Java versions are released on a regular cadence, but not all versions carry the same level of support. Long-Term Support (LTS) releases are the most stable choice for most users and developers because they receive security and maintenance updates for years after release.
As a general guide:
- Java 21 is the most recent LTS release as of late 2023 and is widely considered the stable, future-ready choice for new projects.
- Java 17 is another LTS version that remains broadly used across enterprise and production environments.
- Java 11 was an earlier LTS release and is still in use in many legacy systems.
- Java 8 is very old by modern standards but remains surprisingly common in older enterprise and legacy applications.
If a specific application you're trying to run requires a particular version, defer to that requirement — some older applications explicitly need Java 8 or Java 11 and may not run correctly on newer versions due to API changes and removed legacy features.
Common Issues After Downloading Java
- "Java is not recognized" error on Windows — This usually means the
JAVA_HOMEenvironment variable or the systemPATHhasn't been set correctly. Most modern installers handle this automatically, but manual configuration is sometimes needed. - Multiple Java versions installed — Having more than one version on the same machine is common for developers. Tools like SDKMAN! (Linux/macOS) or jEnv help manage multiple versions cleanly.
- Browser plugins for Java — Modern browsers no longer support Java applets. If you're trying to run Java content in a browser, that's a different problem — Java browser plugins were deprecated years ago and won't work regardless of which version you install.
The Variable That Changes Everything 🔍
The "right" way to download Java isn't the same for a student running their first Hello World program, a developer managing a complex microservices project, an IT admin deploying across hundreds of enterprise machines, or someone trying to run a legacy business application from 2009.
The platform you're on, the chip architecture inside your device, whether you need a JRE or a JDK, the specific Java version a target application requires, and whether your use case is commercial or personal all feed into which distribution, which version, and which installation method actually makes sense. The technical steps are straightforward once those variables are clear — and those variables belong entirely to your situation.