How to Download and Install Java 17 on Windows 10
1. Introduction
This is an in-depth article related to the installing of Java 17 on Windows 10. Java 17 is the Long term support version released by Oracle. This version is a stable version that can be maintained for a longer duration.
2. Java 17 on Windows 10
2.1 Prerequisites
Java 17 is required on the Windows operating system.
2.2 How to download Java 17 on windows 10
You can download Java 17 can be downloaded from the Oracle website.
2.3 New Features in Java 17
Below are the features of Java 17:
- Context-Specific Deserialization Filters
- Vector API
- Foreign Function & Memory API
- Deprecate the Security Manager for Removal
- Remove the Experimental AOT and JIT Compiler
- Sealed Classes
- Remove RMI Activation
- Pattern Matching for switch
- Strongly Encapsulate JDK Internals
- Deprecate the Applet API for Removal
- New macOS Rendering Pipeline
- macOS/AArch64 Port
- Enhanced Pseudo-Random Number Generators
- Restore Always-Strict Floating-Point Semantics
- Context-Specific
Oracle’s new release model had two long-term releases which are Java 11 and Java 17. The next long-term support version will be java 21 which will be released in 2023. Long term support version is more stable and secure compared to other versions.
2.4 How to install Java 17 on windows 10
You can install the java 17 version through the installer and follow the steps. The screenshot is shown below related to the installation.
Now you can click on the next and select the location. The status will be shown as in progress for some time. After completion, you can see the installation completion as shown in the screenshot below.
You can set the environment variables for JAVA_HOME and PATH. They can be set as shown below:
Setup
JAVA_HOME="/desktop/jdk1.17" export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH
2.5 Java 17 Example
You can write an example as shown in the code snippet below:
Java 17 Example
public class Test { public static void main(String[] args) { System.out.println("Java 17 running"); } }
You can compile the code above using the command below:
Java 17 Example Compilation
javac Test.java
The output of the above command executes is shown below:
Java 17 Example Execution Output
C:\Users\bhagvank\Desktop\jdk17>javac Test.java C:\Users\bhagvank\Desktop\jdk17>java Test Java 17 running C:\Users\bhagvank\Desktop\jdk17>
Now, you are ready to explore Java 17 New Features.
3. Download the Source Code
You can download the full source code of this example here: How to Download and Install Java 17 on Windows 10