How to Uninstall JDK from Windows
- Details
- Written by Nam Ha Minh
- Last Updated on 30 October 2021   |   Print Email
In this short post, I’d like to share with you how to completely remove Java Development Kit (JDK) from Windows operating system, both Oracle JDK and OpenJDK, even without uninstaller program.
You should uninstall old version of JDK that is no longer used, for security reason because newer JDK always has improved security.
1. Uninstall Oracle JDK using uninstaller
On Windows 10, click menu Start > Settings, then click Apps in Settings window. Under Apps & Features, click on the JDK version you wish to remove:
Just click Uninstall two times and it will remove JDK quickly from your operating system. You can verify by typing java -version in command prompt, and check the directory C:\Program Files\Java.
2. Uninstall Open JDK
If you have OpenJDK installed from Zip archive, just delete the whole extracted directory. You can type where java in command prompt to know the installation directory:
Then change the current directory to OpenJDK directory and type the following command:
del /s /f /q jdk-15
You can also press Shift + Delete on a folder in Windows explorer.
3. Uninstall Oracle JDK without uninstaller
In case you could not find uninstaller for Oracle JDK, you need to delete the following directories (for example, remove JDK 1.8).
- JDK installation folder: C:\Program Files\Java\jdk1.8.0_251
- Java cache folder: C:\ProgramData\Oracle\Java
- Java updater program: C:\Program Files (x86)\Common Files\Java
- Java path: C:\Program Files (x86)\Oracle\Java
That’s how to uninstall JDK (both Oracle JDK and OpenJDK) from Windows computer. To see the steps in action, I recommend you watch this video:
Other Uninstallation Guides:
- How to Uninstall NetBeans IDE completely from Windows
- How to Completely Uninstall Eclipse IDE from Windows computer
Comments