How to jdk download
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 4, 2026
Key Facts
- The JDK is essential for developing Java applications.
- Oracle provides the official JDK, but other OpenJDK builds are available.
- Ensure you download the correct version for your operating system (Windows, macOS, Linux).
- A Java Runtime Environment (JRE) is included with the JDK, allowing you to run Java applications.
- JDK versions are released regularly, with LTS (Long-Term Support) versions offering extended support.
What is the JDK?
The Java Development Kit (JDK) is a software development kit used to develop applications for the Java programming language. It contains the Java Runtime Environment (JRE), along with tools necessary for development, such as the compiler, debugger, and other utilities. Essentially, if you want to write and compile Java code, you need the JDK.
Where to Download the JDK
There are several reliable sources for downloading the JDK. The most common and official source is Oracle. However, due to licensing changes, many developers opt for OpenJDK builds from alternative providers.
Oracle JDK
Oracle offers its own distribution of the JDK. Historically, this was the primary source for Java developers. While Oracle JDK is free for development and testing purposes, commercial use often requires a paid license. To download from Oracle:
- Navigate to the Oracle Java SE Downloads page (search for "Oracle Java SE Downloads").
- Select the latest version or a Long-Term Support (LTS) version. LTS versions receive updates for a longer period, making them a stable choice for many projects.
- Choose the operating system you are using (Windows, macOS, Linux).
- Download the installer package. This will typically be an executable file (.exe for Windows) or a compressed archive (.tar.gz for Linux/macOS).
- Run the installer and follow the on-screen prompts.
OpenJDK Distributions
OpenJDK is an open-source implementation of the Java Platform, Standard Edition. Many vendors provide pre-built OpenJDK binaries that are free to use for any purpose, including commercial deployment. Some popular OpenJDK providers include:
- Adoptium (Eclipse Temurin): This is a community-driven, open-source project that provides high-quality, TCK-certified builds of OpenJDK. It's a very popular choice for developers seeking a free and open alternative. Visit the Adoptium website (adoptium.net) to download.
- Amazon Corretto: Amazon's free, multiplatform, production-ready distribution of OpenJDK.
- Microsoft Build of OpenJDK: Microsoft's distribution of OpenJDK.
- Azul Zulu Community: Azul offers free builds of OpenJDK.
The download and installation process for these distributions is generally similar to Oracle JDK: select your OS and version, download the installer, and run it.
Installing the JDK
Once you have downloaded the installer:
- Windows: Double-click the downloaded .exe file and follow the installation wizard. You may need to set the JAVA_HOME environment variable and add the JDK's `bin` directory to your system's PATH environment variable.
- macOS: The installer is usually a .dmg file. Mount it and run the installer package. Similar to Windows, you might need to configure environment variables.
- Linux: If you downloaded a .tar.gz archive, you'll need to extract it to a desired location (e.g., `/usr/local/java`). Then, you'll need to set the JAVA_HOME and PATH environment variables in your shell configuration file (e.g., `.bashrc`, `.zshrc`). Some Linux distributions also offer OpenJDK packages through their package managers (e.g., `apt`, `yum`), which can simplify installation and management.
Verifying the Installation
After installation, you can verify that the JDK is set up correctly by opening a terminal or command prompt and typing the following command:
java -versionThis command should output the version of the Java runtime that is installed. To check the compiler version, use:
javac -versionIf these commands return version information, your JDK has been successfully installed and configured.
Choosing the Right JDK Version
Java versions are released frequently. Oracle and other providers offer both the latest feature releases and Long-Term Support (LTS) releases. LTS releases (e.g., Java 8, 11, 17, 21) receive security updates and bug fixes for an extended period, making them ideal for production environments where stability is paramount. For learning or experimenting with new features, the latest release might be suitable.
More How To in Daily Life
Also in Daily Life
More "How To" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Java SE Downloads - Oraclefair-use
- Eclipse Temurin (Adoptium)CC0-1.0
- OpenJDKCC0-1.0
Missing an answer?
Suggest a question and we'll generate an answer for it.