5 Installation of the JDK on Microsoft Windows Platforms
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
By default, the JDK is installed in C:/Program Files/Java/jdk-<FEATURE> where <FEATURE> is the feature release number. For example, the default installation directory for JDK 26 would be C:/Program Files/Java/jdk-26, and the default installation directory for JDK 26 would be C:/Program Files/Java/jdk-26.0.1.
A junction, which is an alias to another directory on the computer, is created that points to the latest JDK 26 feature release. This junction is removed when the last JDK 26 installation is uninstalled.
For example, if JDK 26.0.1 is the latest JDK 26 feature release, and you also have also installed JDK 26, then when you install JDK 26.0.1, the JDK installer creates a junction named C:\Program Files\Java\latest\jdk-26 that points to where JDK 26.0.1 was installed (which is, by default, C:\Program Files\Java\jdk-26.0.1).
Note:
Don't replace or overwrite the JDK installation while any Java processes are running. Stop all Java processes completely before updating, overwriting, or replacing the JDK directory with a new version to prevent unexpected errors.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
In a browser, go to the Java SE Development Kit 11 Downloads page and click Accept License Agreement. Under the Download menu, click the Download link that corresponds to the .exe for your version of Windows.
Download the file jdk-26.interim.update.patch_windows-x64_bin.exe.
Note:
Verify the successful completion of file download by comparing the file size on the download page and your local drive.Installing the JDK from the JDK .exe Installer
- Start the JDK 26 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 disk space.
Note:
During installation, the following files are copied to your computer:"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 the JDK's bin directory.
Installing the JDK from the MSI Enterprise Installer
The JDK MSI Enterprise Installer is packaged as an .msi
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 26.
- Download
jdk-26_windows-x64_bin.msifrom the Java SE Downloads page. - 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.
- Download
jdk-26_windows-x64_bin.msifrom the Java SE Downloads page. - 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
mode:
msiexec.exe /i jdk-26_windows-x64_bin.msi - Silent mode:
msiexec.exe jdk-26_windows-x64_bin.msi /qn
- 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 /L
C:\path\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 C:\path\setup.log
file.
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.
jdk.exe /sNote:
- The notation jdk stands for the downloaded installer file base name,
such as
jdk-26_windows-x64_bin.exe. - You don't need to run the
ADDLOCALcommand as everything is installed by default.
Beginning to Use the JDK
Select Java Development Kit in the Windows Start menu to access information related to Reference Documentation.
During JDK installation and uninstallation processes, Start menu items are updated so that they are associated with the latest JDK version on the system.
Note:
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:%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs.
Uninstalling the JDK on Windows
Uninstalling the JDK in Silent Mode
You can use the command line for uninstalling the JDK.
MsiExec.exe/X{<UninstallString>} For example, to uninstall JDK 18, run the command:
MsiExec.exe /X{B1405ADC-C0CA-5E63-B1E0-51F5A9A2627C}To find <UninstallString>, see Finding the JDK Registry Key and UninstallString Value.
Note:
- This command can be run from anywhere.
- The
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, append
REBOOT=Roption to the command. - Append
/l "C:\<path>setup.log"option to the command if you want to create a log file describing the uninstallation status.
The Windows Installer dialog appears prompting you for confirmation. Click Yes to uninstall JDK.
Finding the JDK Registry Key and UninstallString Value