This topic includes the following sections:
System Requirements for Installing the JDK on 64-Bit Windows Platform
For supported processors and browsers, see Oracle JDK Certified Systems Configurations.
JDK Installation Instruction Notation for Windows
JDK installers now support only one version of any Java feature release. You can't install multiple versions of the same feature release.
jdk-17.0.1simultaneously. If you attempt to install
jdk-17is installed, the installer uninstalls
Note:If you install an older version of a JDK when the newer version of the same feature family already exists, an error is displayed, prompting you to uninstall a newer JDK version if an older version has to be installed.
JDK is installed in
<FEATURE> is the feature release number. For
example, JDK 17.0.1 is installed in
JDK Installation Instructions for Windows
You run a self-installing executable file to unpack and install the JDK on Windows computers.
Install JDK on Windows computers by performing the actions described in the following topics:
Downloading the JDK Installer
Access Java SE Downloads page and
click Accept License Agreement. Under the Download menu, click the Download link that corresponds to the
your version of Windows.
Download the file
Note:Verify the successful completion of file download by comparing the file size on the download page and your local drive. Alternatively, you can ensure that the downloaded file's checksum matches the one provided on the Java SE Downloads page.
Installing the JDK from the JDK .exe Installer
- Start the JDK 17 installer by double-clicking the installer's icon or file name in the download location.
- Follow the instructions provided by the installer.
- After the installation is complete, delete the downloaded file to recover the disk space.
Note:During installation, the following files are copied to the location mentioned:
"C:\Program Files\Common Files\Oracle\Java\javapath\java.exe" "C:\Program Files\Common Files\Oracle\Java\javapath\javaw.exe" "C:\Program Files\Common Files\Oracle\Java\javapath\javac.exe" "C:\Program Files\Common Files\Oracle\Java\javapath\jshell.exe"
Alternatively, you can run these executables directly from
Installing the JDK from the MSI Enterprise Installer
The JDK MSI Enterprise Installer is packaged as a
installer and runs with minimal dialogs. It supports silent installation of the JDK and is
customizable using command line parameters.
You must have administrative permissions install JDK 17.
- Double click the
.msifile to run the installer.
Installing the JDK from the Command Line
You can install the JDK by downloading the appropriate Oracle JDK MSI Enterprise Installer for your system and running it from the command line.
- Open an MS-DOS prompt with Administrative permissions.
- Run one of the following commands depending on the type of installation that
you want to perform:
- Basic UI
msiexec.exe /i installer.msi
- Silent mode:
msiexec.exe installer.msi /qn
installer.msiis the name of the MSI Enterprise JDK Installer that you obtained in the previous step.
- Basic UI mode:
Creating a Log File
You can use a log file to verify that an installation succeeded.
To create a log file describing the installation, append
\setup.log to the install command and scroll to the end of the log file to verify.
The following is an example of creating a log file:
msiexec.exe /i installer.msi /L C:\path\setup.log
In this example, the log is written to the
Installing the JDK Silently
Instead of double-clicking or opening the JDK installer, you can perform a silent, non interactive, JDK installation by using command-line arguments.
- The notation jdk stands for the downloaded installer file base name,
- You don't need to run the
ADDLOCALcommand anymore as everything gets installed by default.
Beginning to Use the JDK
Use the Java Development Kit in the Windows Start menu to access information related to Reference Documentation.
During JDK install, Java menu items are added to the Windows Start menu to provide easy access to Reference Documentation, which is online documentation web page.
During JDK installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JDK version on the system
Note:The Windows 10 has a Start menu; however, the menu is not available in Windows 8 and Windows 8.1. The JDK and Java information in Windows 8 and Windows 8.1 is available in the following Start directory:
Uninstalling the JDK on Windows
Uninstalling the JDK in Silent Mode
You can use the command line for uninstalling the JDK.
For example, to uninstall JDK 15, run the command:
To find the UninstallString, see Finding the JDK Registry Key and UninstallString Value .
- This command can be run from anywhere.
msiexec.exeexecutable is located in the windows system directory.
- A reboot is required only if some files are in use
during uninstallation; it is not necessary everytime.
However, to manually suppress reboot while uninstalling,
REBOOT=Roption to the command.
/l “C:\<path>setup.log”option to the command if you want to create a log file describing the uninstallation status.
Windows Installer dialog appears prompting you for confirmation. Click Yes to uninstall JDK.
Finding the JDK Registry Key and UninstallString Value
- Go to Start and type Regedit.
- In the Registry Editor, go to
Uninstallfolder, you will find many registry entries within curly brackets.
- Click Edit and then
Uninstallfolder before performing search for a particular registry.
- Enter version string as value to find corresponding registry
key. For example, enter jdk-15.
The registry key is highlighted on the right-hand side of the pane and values of various uninstall strings are displayed on the left-hand pane.
- Note the value of the UninstallString.
JDK Installation Troubleshooting
The topic provide tips for resolving issues while installing JDK.
System Error During Decompression
If you see the error message:
system error during decompression, then there might not be enough space on the disk that contains the
Program Cannot Be Run in DOS Mode
If you see the error message:
This program cannot be run in DOS
mode, then do the following:
Open the MS-DOS shell or command prompt window.
Right-click the title bar.
Select the Program tab.
Ensure that the item Prevent MS-DOS-based programs from detecting Windows is not selected.
Select OK again.
Exit the MS-DOS shell.
Restart your computer.
Characters That Are Not Part of the System Code Page
The associated bug number is 4895647.
Cleanup the Registry After a Failed JDK Uninstall
Sometimes, attempts to uninstall JDK through the Windows Add/Remove program leave behind some Java entries in the registry that are not fully removed. These left behind registry entries can cause problems in installing a new version of Java. The following are the methods to cleanup registry entries:
- Program Install and Uninstall troubleshooter (Recommended Method)
- Manual Registry Edit
Program Install and Uninstall troubleshooter (Recommended Method)
Run the Program Install and Uninstall troubleshooter to repair the corrupted registry keys that prevent programs from being completely uninstalled, or blocks new installations and updates.
Manually edit the registry (Use this only if the Fix It utility does not work)
Incorrectly editing your registry may severely damage your system. You should back up any valued data from your computer before making changes to the registry.
File->Export functionality of the
registry editor to save the registry key before deleting. In case you deleted the
wrong registry key, you can restore the registry from your saved backup file, by
To delete the registry key:
Determine the correct Registry Key. See Finding the JDK Registry Key and UninstallString Value.
Highlight the key, Right click and select Delete.
Click Yes when prompted.
The JDK gets uninstalled.
Fixing Shim Situation when JDK 17 and JRE 8 is Installed
When you install JDK 17 and then install JRE 8, and then run the
java -version command,
1.8.0 is displayed in
the output instead of
17. This is because the
javapath is placed before JDK 17 location in the user
This is a bug with the JRE 8 installer. To fix this shim situation, uninstall and reinstall JDK 17.