How to Install JDK Java Development Kit 22 in Microsoft Windows
Introduction
This is another article where the focus is to enlist steps for installing Java Development Kit. It will use JDK (Java Development Kit) exist in the Oracle official page. There are several version exist in the page. Just choose the suitable version accordingly. In other words, choose the suitable version according to the version of the operating system used in the device. In this article, since it is demonstrating the installation process using a device using Microsoft Windows, just download the Microsoft Windows’ version.
Installing Oracle JDK (Java Development Kit) 22
In this section below, the following descriptions will enlist the steps for installing Oracle JDK (Java Development Kit) 22 in a device using Microsoft Windows as its operating system :
-
Just run any web browser available in the device.
-
Type ‘download jdk’ in the URL address bar of the web browser. Type ‘enter’ to execute it. It will then pass the keyword ‘download jdk’ to the Google search engine. It will return an output result in the web browser.
-
Click the Oracle JDK official page to download the JDK file installer.
-
As soon as the web browser display the Oracle JDK official page, search the suitable link for downloading the JDK file installer. In this example, choose the newest version which at this time it is JDK 22. Furthermore, choose the Microsoft Windows version since it will be installed in a device running using Microsoft Windows as its operating system.
-
Just follow the instruction exist in the installation process until it is done.
-
Run Command Prompt which is the Command Line Interface tool in Microsoft Windows. It will be useful for checking whether Java installation process is a success or not.
-
Last but not least, in the running Command Prompt type ‘java’ or ‘where java’ to check the ‘java’ existence. If it is giving a proper output based on the command, it means that he JDK installation process is a success. Below is most likely the appearance of the command execution :
Microsoft Windows [Version 10.0.22631.4037] (c) Microsoft Corporation. All rights reserved. C:\Users\Personal>java Usage: java [options] <mainclass> [args...] (to execute a class) or java [options] -jar <jarfile> [args...] (to execute a jar file) or java [options] -m <module>[/<mainclass>] [args...] java [options] --module <module>[/<mainclass>] [args...] (to execute the main class in a module) or java [options] <sourcefile> [args] (to execute a source-file program) Arguments following the main class, source file, -jar <jarfile>, -m or --module <module>/<mainclass> are passed as the arguments to main class. where options include: -cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> --class-path <class search path of directories and zip/jar files> A ; separated list of directories, JAR archives, and ZIP archives to search for class files. -p <module path> --module-path <module path>... A ; separated list of elements, each element is a file path to a module or a directory containing modules. Each module is either a modular JAR or an exploded-module directory. --upgrade-module-path <module path>... A ; separated list of elements, each element is a file path to a module or a directory containing modules to replace upgradeable modules in the runtime image. Each module is either a modular JAR or an exploded-module directory. --add-modules <module name>[,<module name>...] root modules to resolve in addition to the initial module. <module name> can also be ALL-DEFAULT, ALL-SYSTEM, ALL-MODULE-PATH. --enable-native-access <module name>[,<module name>...] allow code in modules to access code and data outside the Java runtime. <module name> can also be ALL-UNNAMED to indicate code on the class path. --list-modules list observable modules and exit -d <module name> --describe-module <module name> describe a module and exit --dry-run create VM and load main class but do not execute main method. The --dry-run option may be useful for validating the command-line options such as the module system configuration. --validate-modules validate all modules and exit The --validate-modules option may be useful for finding conflicts and other errors with modules on the module path. -D<name>=<value> set a system property -verbose:[class|module|gc|jni] enable verbose output for the given subsystem -version print product version to the error stream and exit --version print product version to the output stream and exit -showversion print product version to the error stream and continue --show-version print product version to the output stream and continue --show-module-resolution show module resolution output during startup -? -h -help print this help message to the error stream --help print this help message to the output stream -X print help on extra options to the error stream --help-extra print help on extra options to the output stream -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions with specified granularity -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:jdwp see also -agentlib:jdwp=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specified image HiDPI scaled images are automatically supported and used if available. The unscaled image filename, e.g. image.ext, should always be passed as the argument to the -splash option. The most appropriate scaled image provided will be picked up automatically. See the SplashScreen API documentation for more information @argument files one or more argument files containing options --disable-@files prevent further argument file expansion --enable-preview allow classes to depend on preview features of this release To specify an argument for a long option, you can use --<name>=<value> or --<name> <value>. C:\Users\Personal>
Also another command execution for locating the ‘java.exe’ location :
C:\Users\Personal>where java C:\Program Files\Common Files\Oracle\Java\javapath\java.exe C:\Users\Personal>
For checking in a more detail format, just check the following video content :