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:

uninstall jdk

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:

where java command

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:

 


About the Author:

is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.



Add comment