Download Java 21: The Latest Version of the Java SE Platform
How to Download and Install Java 21
Java is one of the most popular programming languages in the world, used for developing applications for various platforms, such as desktops, web servers, mobile devices, embedded systems, etc. Java is also a platform-independent language, meaning that it can run on any machine that has a Java Virtual Machine (JVM) installed.
download java 21
Java 21 is the latest release of the Java Standard Edition (SE) platform, which is scheduled to be released in September 2023 as a long-term support (LTS) release. This means that it will receive updates and security patches for several years after its release date. Java 21 introduces several new features and improvements that make Java more expressive, efficient, secure, and compatible.
In this article, we will show you how to download and install Java 21 on your computer, as well as how to use some of its new features. We will also explain why you should consider upgrading to Java 21 if you are still using an older version of Java.
System Requirements for Java 21
Before you download and install Java 21 , you should check if your system meets the minimum and recommended requirements for running Java 21. Here are the system requirements for Java 21 according to the official documentation:
Operating System
Minimum Requirement
Recommended Requirement
Windows
Windows 10 (64-bit)
Windows 10 (64-bit) with latest updates
Linux
Any Linux distribution that supports GLIBC 2.12 or later (64-bit)
Any Linux distribution that supports GLIBC 2.12 or later (64-bit) with latest updates
Mac OS
Mac OS X 10.13 or later (64-bit)
Mac OS X 10.15 or later (64-bit) with latest updates
Solaris
Solaris 11.4 or later (64-bit)
Solaris 11.4 or later (64-bit) with latest updates
In addition to the operating system, you also need to have enough memory and disk space to run Java 21. The minimum memory requirement is 128 MB of RAM, and the recommended memory requirement is 512 MB of RAM or more. The minimum disk space requirement is 250 MB of free space, and the recommended disk space requirement is 1 GB of free space or more.
Downloading Java 21
To download Java 21, you need to visit the official website of Oracle, which is the company that develops and maintains Java. You can find the download page for Java 21 here:
On this page, you will see different options for downloading Java 21, depending on your needs and preferences. Here are some of the options available:
JDK (Java Development Kit): This is the option you should choose if you want to develop Java applications using Java 21. The JDK includes the Java compiler, the Java runtime, the JShell tool, and other development tools.
JRE (Java Runtime Environment): This is the option you should choose if you only want to run Java applications using Java 21. The JRE includes only the Java runtime and does not include any development tools.
GraalVM: This is an option you can choose if you want to use a high-performance JVM that supports multiple languages, such as JavaScript, Python, Ruby, etc. GraalVM is based on Java 21 and includes the JDK, the JRE, and other features.
Eclipse Temurin: This is an option you can choose if you want to use a free and open-source distribution of Java 21 that is compatible with Oracle's JDK. Eclipse Temurin is developed by the Eclipse Foundation and includes the JDK and the JRE.
Zulu: This is an option you can choose if you want to use another free and open-source distribution of Java 21 that is compatible with Oracle's JDK. Zulu is developed by Azul Systems and includes the JDK and the JRE.
You can choose any of these options depending on your needs and preferences, but for this article, we will assume that you are downloading the JDK from Oracle's website. To do so, follow these steps:
Click on the "JDK Download" button on the download page.
Select your platform from the list of available platforms, such as Windows x64, Linux x64, Mac OS X x64, etc.
Accept the license agreement by checking the box next to it.
Click on the download link for your platform to start downloading the installer file.
Save the installer file to your preferred location on your computer.
Installing Java 21
To install Java 21 on your computer, you need to run the installer file that you downloaded in the previous step. The installation process may vary slightly depending on your platform, but in general, it involves these steps:
Double-click on the installer file to launch it.
Follow the instructions on the screen to complete the installation process.
Select a destination folder for installing Java 21 on your computer.
Select whether you want to install any additional features or tools, such as source code, demos, examples, etc.Click on the "Install" button to start the installation process.
Wait for the installation process to finish.
Click on the "Finish" button to exit the installer.
Congratulations, you have successfully installed Java 21 on your computer. You can verify that Java 21 is installed correctly by opening a command prompt or a terminal and typing the following command:
download java 21 for windows 10
download java 21 for mac
download java 21 for linux
download java 21 jdk
download java 21 jre
download java 21 oracle
download java 21 openjdk
download java 21 zip
download java 21 exe
download java 21 msi
download java 21 offline installer
download java 21 online installer
download java 21 rpm
download java 21 deb
download java 21 dmg
download java 21 tar.gz
download java 21 documentation
download java 21 source code
download java 21 development kit
download java 21 runtime environment
download java 21 update
download java 21 patch
download java 21 release notes
download java 21 license agreement
download java 21 installation guide
download java 21 tutorial
download java 21 features
download java 21 free
download java 21 latest version
download java 21 stable version
download java 21 preview version
download java 21 experimental version
download java 21 early access builds
download java 21 graalvm
download java 21 zgc
download java 21 string templates
download java 21 sequenced collections
download java 21 record patterns
download java 21 foreign function and memory api
download java 21 unnamed patterns and variables
download java 21 virtual threads
download java 21 unnamed classes and instance main methods
download java 21 scoped values
download java 21 vector api
download java 21 key encapsulation mechanism api
download java 21 structured concurrency
how to download java 21
where to download java 21
why to download java 21
java -version
You should see something like this:
java version "21" 2023-09-14 LTS Java(TM) SE Runtime Environment (build 21+12-LTS-237) Java HotSpot(TM) 64-Bit Server VM (build 21+12-LTS-237, mixed mode, sharing)
How to Use Java 21
Now that you have installed Java 21 on your computer, you can start using it to develop and run Java applications. Java 21 comes with several tools and resources that can help you with your Java development. In this section, we will show you how to use some of these tools and resources.
Setting Up the Environment Variables
One of the first things you need to do before using Java 21 is to set up the environment variables that point to the Java 21 installation directory and bin folder. These environment variables are JAVA_HOME and PATH, and they are used by other tools and applications that rely on Java.
The JAVA_HOME environment variable is used to specify the location of the Java 21 installation directory on your computer. The PATH environment variable is used to specify the location of the Java 21 bin folder, which contains the executable files for the Java tools, such as javac, java, javadoc, etc.
The way you set up these environment variables depends on your operating system and platform. Here are some general steps for setting up these environment variables:
Find out the location of the Java 21 installation directory and bin folder on your computer. For example, if you installed Java 21 on Windows using the default settings, the installation directory would be C:\Program Files\Java\jdk-21, and the bin folder would be C:\Program Files\Java\jdk-21\bin.
Edit the system or user environment variables on your computer and add or modify the JAVA_HOME and PATH variables. For example, if you are using Windows, you can edit the environment variables by following these steps:
Open the Control Panel and click on System and Security.
Click on System and then click on Advanced system settings.
Click on Environment Variables.
In the System variables or User variables section, click on New to add a new variable, or click on Edit to modify an existing variable.
Enter JAVA_HOME as the variable name and enter the location of the Java 21 installation directory as the variable value. For example, C:\Program Files\Java\jdk-21.
Enter PATH as the variable name and ente