How to Download Java: A Complete Guide for Every Platform

Java remains one of the most widely used programming environments in the world — powering everything from Android apps and enterprise software to Minecraft servers and academic coursework. If you're trying to get Java installed on your machine, the process is straightforward, but there are a few important distinctions to understand before you click download.

What Exactly Are You Downloading?

This is where many people get confused first. "Java" can refer to two different things:

  • Java Runtime Environment (JRE): This is what you need to run Java-based applications. If someone sent you a .jar file or you're launching a Java-powered program, this is your target.
  • Java Development Kit (JDK): This is what developers need to write and compile Java code. The JDK includes the JRE plus compilers, debuggers, and other developer tools.

If you're not sure which you need, the JDK is the safer choice — it includes everything the JRE does, plus the tools you might need later.

Where Does Java Come From?

Java was originally developed by Sun Microsystems, which was acquired by Oracle in 2010. Today, there are two main distribution paths:

  • Oracle JDK: The official commercial distribution from Oracle. Free for personal and development use, but licensing applies in certain commercial production environments.
  • OpenJDK: The open-source reference implementation of Java. Functionally equivalent for most use cases and used as the base for many other distributions.

Beyond those two, there are other OpenJDK-based distributions — including Amazon Corretto, Eclipse Temurin (from Adoptium), and Microsoft Build of OpenJDK — each optimized for specific deployment environments like cloud servers or Windows ecosystems. For most general users and developers, the differences are minimal.

How to Download Java on Windows ☕

  1. Go to the official Oracle website (oracle.com) or adoptium.net for Eclipse Temurin.
  2. Select your Java version (more on version numbers below).
  3. Choose the Windows x64 Installer (.exe) for most modern systems.
  4. Run the installer — it handles PATH configuration automatically in most cases.
  5. Verify installation by opening Command Prompt and typing java -version.

You should see output showing the version number. If you get an error, the PATH variable may need manual adjustment in System Environment Variables.

How to Download Java on macOS

  1. Visit oracle.com or adoptium.net.
  2. Choose the macOS package — typically a .dmg file for Apple silicon (ARM) or Intel x64 depending on your chip.
  3. Open the .dmg, run the installer, and follow the prompts.
  4. Verify by opening Terminal and running java -version.

Apple silicon Macs (M1, M2, M3 series) should download the ARM64 build for native performance. Downloading the x64 build will still run via Rosetta 2, but native ARM builds are more efficient.

How to Download Java on Linux 🐧

Linux users typically have more options:

Via package manager (recommended for most users):

sudo apt install default-jdk # Debian/Ubuntu sudo dnf install java-latest-openjdk # Fedora/RHEL 

Manual download: Download a .tar.gz archive from adoptium.net or oracle.com, extract it, and set your JAVA_HOME environment variable to point to the directory.

The package manager route keeps Java updated automatically and handles PATH setup for you. Manual installs give more control over which exact version runs on the system.

Which Java Version Should You Choose?

Java version numbers can be disorienting. Here's the core logic:

Version TypeWhat It Means
LTS (Long-Term Support)Receives updates and security patches for years — the stable choice
Non-LTSShort patch window, used by developers who want the latest features
Legacy versions (Java 8, 11)Still widely used; required by many older enterprise applications

Java 8 and Java 11 are the most common requirements for legacy software. Java 17 and Java 21 are current LTS releases as of recent cycles and are appropriate for new projects. Some tools and frameworks specify a minimum Java version — always check that requirement before downloading.

Variables That Affect Your Setup

Getting Java downloaded is only half the picture. Several factors shape what happens after:

  • Operating system and chip architecture: x64 vs ARM64 matters, especially on Apple silicon and newer ARM-based Windows devices.
  • Application requirements: Minecraft, IntelliJ IDEA, Eclipse, and enterprise tools all have specific Java version requirements. Installing the wrong version means the software won't run correctly.
  • Multiple Java versions: Developers often need to run Java 8 for one project and Java 21 for another. Tools like SDKMAN! (Linux/macOS) or jenv let you manage multiple versions side by side.
  • Corporate or institutional environments: IT departments sometimes control which Java version is approved for installation, and you may need to request it through internal channels rather than downloading directly.
  • Server vs desktop use: Headless server environments often need only a JRE, while IDEs and GUI-based tools need the full JDK.

A Note on Keeping Java Updated

Java releases security patches regularly. Running an outdated version — especially in a networked or web-facing context — introduces real risk. Both Oracle and OpenJDK distributors publish CVE (Common Vulnerabilities and Exposures) advisories when patches are issued. Staying on an LTS version makes this easier, since those releases maintain a longer patch window.

Browsers no longer support the Java browser plugin (retired since Java 9), so web-based Java applets are no longer a concern for most users. Modern Java use is almost entirely desktop applications, server-side software, or development tooling.


Whether a single JDK install on your laptop covers everything you need — or whether you're managing multiple versions across different projects and environments — depends entirely on what you're building, running, or maintaining and how your current system is already configured.