Sub topic 3
Choose a JDK for Your Computer
Before you download a Java Development Kit, or JDK, you need to choose a copy that fits your computer and your learning goals. A JDK includes the tools used to create and run Java programs. The right choice makes the later installation step much easier.
A JDK download page may ask several questions at once. You will usually need to choose:
- An operating system, such as Windows, macOS, or Linux.
- A processor architecture, such as x64 or ARM64.
- A Java version, such as Java 21.
- A JDK provider and download format.
This chapter helps you make those choices. You do not need to install anything yet.
Start with the Course or Project Requirements
If a course, teacher, or project tells you to use a particular Java version, start there. A project is a set of files that make up a program. Its instructions may specify a JDK version and sometimes a provider.
The Java version is the numbered release of Java. For example, Java 21 and Java 25 are different releases. A newer version is not always the right choice for an existing project. The project may rely on an older version or its tools may not support a newer one yet.
If there are no version instructions, a good starting point is a current, supported long-term support release. Long-term support, or LTS, means that a provider offers updates for that release over an extended period. Java 17, 21, and 25 are examples of LTS releases. Support dates differ by provider, so check the provider’s support information.
Choose the latest available update within the version you need. An update, sometimes called a patch release, fixes problems and may address security issues. For example, if your course requires Java 21, choose a current Java 21 update rather than an old Java 21 download.
Identify Your Operating System
An operating system is the main software that runs your computer and lets you use its programs. JDK downloads are made for particular operating systems. A Windows download is not the right choice for macOS or Linux.
| Operating system | Where to look |
|---|---|
| Windows | Open Settings, then System, then About. Look under Windows specifications for the version. |
| macOS | Open the Apple menu and choose About This Mac. Look for the macOS version. |
| Linux | Check your system settings, or use the command below to see information about your Linux distribution. |
A Linux distribution is a version of Linux that packages the operating system and its tools. Ubuntu, Debian, and Fedora are examples. On many Linux systems, this command shows the distribution name and version:
cat /etc/os-releaseThe file contains several lines. Look for a name such as Ubuntu or Fedora and a version number.
Download pages may list a minimum supported operating system version. If your computer is older than that minimum, do not assume the JDK will work. Check the provider’s supported systems or look for a compatible JDK that also meets your course’s requirements.
Identify Your Processor Architecture
A processor is the part of a computer that carries out instructions. Its architecture is the family of instructions it understands. A JDK download must match the system on which you will run it.
The two common choices on download pages are x64 and ARM64. Each may appear under more than one name.
| Download-page name | Other names you may see | Common computers |
|---|---|---|
| x64 | x86-64, x86_64, amd64 | Many Windows and Linux computers with Intel or AMD processors; Intel Macs |
| ARM64 | AArch64, aarch64 | Apple silicon Macs and some Windows and Linux computers |
| x86, 32-bit | x86, i386, i686 | Some older computers and systems |
The name amd64 does not mean the download works only on an AMD processor. It is also a name for the common 64-bit architecture used by many Intel processors.
A 64-bit system handles data in larger units than a 32-bit system. A 32-bit system needs a compatible 32-bit JDK. Support for 32-bit systems can be limited in newer JDK releases, so check the provider’s available downloads carefully.
Find the Architecture on Windows
Open Settings, then System, then About. Under Device specifications, look for System type.
A typical x64 entry says “64-bit operating system, x64-based processor.” For that system, choose a Windows x64 JDK.
Some Windows computers use ARM processors. If your system is Windows on ARM, look for a Windows ARM64 download.
Find the Architecture on macOS
Open the Apple menu and choose About This Mac.
- If you see an Apple chip, such as an M1 or M2, choose macOS ARM64, sometimes labeled Apple silicon.
- If you see an Intel processor, choose macOS x64, sometimes labeled Intel.
Apple silicon is Apple’s family of ARM-based computer processors.
Find the Architecture on Linux
Open a terminal and run:
uname -mA terminal is a window where you enter commands. The command above commonly prints one of these names:
- x86_64 usually points to an x64 download.
- aarch64 usually points to an ARM64 download.
- i686 or i386 points to a 32-bit x86 system.
The command reports the architecture of the running kernel, the core part of the operating system. In unusual setups, such as a 32-bit system using a 64-bit kernel, that may not tell you everything about which JDK download to use. If the result and your system information seem to disagree, check your Linux distribution’s instructions.
Choose a JDK Provider
A JDK provider is an organization that builds and distributes a JDK. A build is a prepared copy of software that you can download and use. Several providers offer builds based on OpenJDK, the open-source implementation of Java. Open source means the source code is available for people to inspect and use under its license.
Examples of JDK providers include:
- Eclipse Temurin, from Adoptium.
- Amazon Corretto.
- Microsoft Build of OpenJDK.
- Oracle JDK.
- Azul Zulu.
These are not different programming languages. For a first program, a suitable JDK from any of these providers can be a reasonable choice. For an existing course or project, follow its provider instructions if it has them.
When comparing providers, check:
- Whether the provider offers your required Java version, operating system, and architecture.
- How long the provider supports that version.
- The license and any conditions that apply to your use.
- Whether the provider offers a download format you are comfortable using.
A license is the set of terms that says how you may use software. Do not assume every provider has the same terms, especially for work or business use.
Download from the provider’s official website or from a software source recommended by your operating system. Avoid an unfamiliar page that happens to offer a JDK file: it may be old, altered, or hard to verify.
For example, the official Eclipse Temurin release page is:
https://adoptium.net/temurin/releases/
You can use that page to explore the choices in the worked example below. The exact page layout and available updates can change.
Choose the JDK, Not Just a Runtime
Some download pages offer both a JDK and a JRE. A JRE, or Java Runtime Environment, provides what is needed to run Java programs. A JDK also provides development tools, including the compiler. A compiler is a tool that translates program text into a form Java can run.
For this tutorial, choose a download labeled JDK. A runtime-only download is not enough for all the steps ahead.
You may also see downloads described as source code. Source code is the text used to create a program. Unless you have a special reason to build the JDK yourself, choose a ready-to-use JDK download rather than its source code.
Choose a Download Format
After choosing the system and JDK version, a provider may offer more than one file format. The format affects how the JDK is set up later; it does not change the Java version you selected.
| Format | Common systems | What it is |
|---|---|---|
| MSI or EXE | Windows | An installer file that guides you through setup. |
| PKG | macOS | An installer file that guides you through setup. |
| DEB | Debian and Ubuntu | A package file for systems that use this format. |
| RPM | Fedora and some other Linux distributions | A package file for systems that use this format. |
| ZIP or TAR.GZ | Varies | An archive, or compressed collection of files, that you unpack and configure yourself. |
For a first installation, an installer or a package made for your Linux distribution is often simpler than an archive. Your Linux distribution may also offer a JDK through its own software system. Check which Java version it provides before choosing it.
Not every provider offers every format for every system. Also check any Linux distribution or system-library requirements on the provider’s download page. A system library is shared software that other programs use. A Linux download labeled only “x64,” for example, may still have requirements that your distribution must meet.
Worked Example: A Windows Laptop
Suppose you have a Windows 11 laptop. Settings shows “64-bit operating system, x64-based processor.” Your course asks for Java 21 and does not name a provider.
You decide to use Eclipse Temurin. On its official release page, look for choices that match:
- Java version: 21.
- Operating system: Windows.
- Architecture: x64.
- Package or image type: JDK.
- File format: MSI, if it is offered.
Then check that Windows 11 is supported and select a current Java 21 update. The result is a Windows x64 JDK for the version your course requires. You are ready to download it in the next chapter.
A macOS user with an Apple M2 chip would make a different system choice: macOS ARM64. If that user’s course also required Java 21, the Java version could stay the same, but the operating system and architecture selections would change.
Check Your Choices Before Downloading
Use this short checklist to avoid the most common selection mistakes:
- The download is a JDK, not just a JRE or source code.
- Its Java version matches your course or project requirement.
- Its operating system and architecture match the system where you will run it.
- Your operating system version meets the provider’s requirements.
- The update is current for the chosen Java version.
- The download comes from an official provider or a trusted operating system source.
- You understand the provider’s support period and license well enough for your use.
If an exact match is unavailable, do not silently choose a different Java version or architecture. First check the course or project instructions. You may need a different provider or a compatible system.
Practice
Exercise
Your course requires Java 21. Your Windows computer has a 64-bit operating system and an x64-based processor. Which main download choices should you make?
Show answer
Choose a current Java 21 JDK for Windows x64. An MSI installer is a convenient format if the provider offers one.
Exercise
A Mac has an Apple M2 chip, and its owner has no required Java version. What should they look for?
Show answer
They can choose a current, supported LTS JDK for macOS ARM64, after checking the provider’s system requirements and support terms.
Exercise
Why is a JRE-only download not the right choice for this tutorial?
Show answer
A JRE is for running Java programs. This tutorial also needs the JDK’s development tools, including the compiler.