Java is a popular, object-oriented programming language and platform. More than 3 million devices use it across the world. It is used for developing desktop applications, web applications, mobile apps, games, and more. It is widely used in many different industries. The websites and apps developed by Java will only work if Java is installed on your device. In fact, more than 95% of all websites use JavaScript in one way or another.

Despite everything, Java is also susceptible to many vulnerabilities, is slow to run, and is the target of numerous viruses. Many software, industries, and platforms are moving away from Java towards alternatives. Java is also not an essential part of Windows, so you don’t necessarily need it except for the programs written in java.

The older versions of Java have had issues in the past but Oracle has fixed most security issues in the newer version of Java. While it is not installed by default on Windows, some programs that need Java to run or system manufacturers might install Java on your system. Whether you no longer need Java and want to completely remove it from Windows 11 or want to install the higher version or newer version, we got you covered.

Uninstalling Java from Windows 1 1 Settings

You can easily remove Java from Windows 11 using the Settings app. To do that, open the Start menu and select ‘Settings’.

In the Settings app, move to ‘Apps’ on the left panel and select ‘Installed apps’ on the right.

From the list of apps, find the Java program that says something like ‘Java 8 Update xxx (64-bit)’ and click the three-dot icon next to it. Then, click the ‘Uninstall’ button.

After that, click ‘Uninstall’ again.

This will uninstall Java from your device. When the User Account Control (UAC) window appears, click ‘Yes’ to allow permissions to make the changes. After that, restart your computer to apply the changes.

Uninstalling Java through Control Panel in Windows 11

Another way to remove Java in Windows 11 is through the Control panel. Here’s how you do that:

Search for ‘Control Panel’ in the Start menu and select it from the result.

In the Control Panel, select the ‘Uninstall a program’ option.

From the list of apps, locate the Java version you want to remove (if you have more than one version installed on your device) and right-click on it. Then, click ‘Uninstall’ and follow the instructions on the installer to remove the program.

Click ‘Yes’ in the User Account Control dialog to continue with the removal of the Java application.

Note: Once you uninstall Java or Java Runtime Environment (JRE), you will no longer be able to run the applications that are programmed by Java and requires Java to function.

Disabling Java in Windows 11

If you don’t use Java often, you can simply disable the java environment instead of fully uninstalling it. Here’s how you do this:

Open the Start menu, search for ‘Java’, and select ‘Configure Java’ from the result.

When the Java Control Panel opens, switch to the ‘Security’ tab and uncheck the ‘Enable Java content for browser and Web Start applications’ option. Then, click ‘Apply’ and select ‘OK’.

Checking Which Version Of Java Is Installed

Java allows you to install multiple versions of java on your system. Although Java is backward-compatible, sometimes certain features do not work well in the newer version of Java. So if you have an application that only runs on a specific version of Java, it is better to have multiple versions of Java on your system. Also, Java does not remove older versions of Java while upgrading, so you have to manually remove the older versions.

To check what versions of Java are installed on your device so that you can remove a particular version, open Command Prompt and run the following command:

Java -version

To check the location of different versions of java executables present in the system, use the below command in Command Prompt:

where java

Uninstalling Out-of-Date Java Versions using the Uninstaller Tool

The easiest way to uninstall Java is by using the dedicated tool provided by Java. Java Uninstall tool is a portable tool that helps get rid of out-of-date versions of Java on your computer as well as provides a link to download the latest version. The tool will automatically check for outdated versions and remove them. It will also clear out any leftover files of Java. Here’s how you do this:

First, download the official Java Uninstall tool from the java website. Go to the website with the given link and click the ‘I Agree to the Terms and want to Continue’ button to download the tool.

Before you continue, make sure to close applications and other browser windows. After it’s downloaded, run the ‘JavaUninstallTool.exe’ to launch the tool.

On the screen, click ‘Agree’ to accept the license terms and continue.

In the next step, all the Java versions on your device will be listed as shown below. The out-of-date version will be selected by default. If you only want to uninstall a particular version of Java, select that version and click ‘Next’. If you want to remove all Java runtime environments from your computer, select all the versions and click ‘Next’.

It will take a minute or so to completely uninstall the selected Java versions.

Once, it’s done click ‘Close’ to close the window.

Uninstalling Java Development Kit (JDK) from Windows 11

If you have OpenJDK or Oracle JDK installed on your device, you can easily remove them through settings, the control panel, or an uninstaller. However, if you have installed OpenJDK from an archive file, you can just delete the whole extracted folder to remove OpenJDK.

To uninstall Java Development Kit (JDK), open Windows settings and go to the ‘Apps’ section.

Find the Java Development Kit (JDK) from the list, click the three dots button and select ‘Uninstall’. Then, select ‘Uninstall’ again to remove the program from the system.

Clearing Java Path from Environmental Variables in Windows 11

When you install Java on Windows, a new path is created in the environmental variables. Sometimes these paths are left behind in the system variables after uninstalling Java. It is always better to remove paths of uninstalled java versions to avoid conflicts in future installations. Let us see how to do that:

First, right-click the Start menu and select ‘System’ to open the ‘About’ settings page directly.

Alternatively, you can open Windows Settings and choose ‘About’ settings under the ‘System’ tab. Under the System tab, scroll down to the bottom of the page and select the ‘About’ tile.

On the About settings page, click on the ‘Advanced system settings’ link in the Related links box.

This will open the System Properties control panel applet. Under the ‘Advanced’ tab, click on the ‘Environmental Variables…’ button.

This will open the Environment Variables window. Now, select the ‘Path’ variable from the System variables list and click on ‘Edit’.

Now, remove all the Java Paths for the versions you have uninstalled. Select the path you want to remove and click ‘Delete’.

After that, click ‘OK’ three times to close all windows.

Uninstalling Java (JDK and JRE) without Uninstaller

If you don’t have an uninstaller for the java version or the Java app does not show up in the Settings, you can navigate to the below-mentioned directories and delete the java files to uninstall it.

  • JDK installation folder: C:\Program Files\Java
  • Java cache folder: C:\Program Files\Common Files\Oracle\Java\
  • Java path:  C:\Program Files (x86)\Common Files\Oracle\Java
  • Java Update: C:\Program Files (x86)\Common Files\Java
  • Java Install cache: C:\ProgramData\Oracle\Java

Cleaning up After Java Failed to Uninstall

Sometimes a Java version may fail to uninstall or does not uninstall completely and leave behind registry entries, installation files, path variables, and cache data. These files can cause problems in installing a new version of Java. We have already seen how to delete the Java directories and path variables. Now, let us see how to clean up registry entries left behind by an incomplete uninstall process:

Press Win+R to open the Run command box, type regedit, and hit Enter.

Then, navigate to the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall 

Now, you need to find the registry entries for the Java version under the Uninstall folder. But it’s not easy to locate the particular registry values in this folder. 

To find the registry entry, click the ‘Edit’ menu and select ‘Find’ or press Ctrl+F from the keyboard. Select the ‘Uninstall’ folder before searching for the registries.

Now, enter the version number of the Java version you wish to remove. (For example, we want to remove Java 7 Update 54). You can find the Java version number from the app settings or using the java -version command as shown before.

You can use use the X.0.XXX format for the version number where X can be the version (6, 7, 8, and so on) and XXX can be the update number (100 for Update 10, 120 for update 12,  510 for update 51, and so on). As you can see below, the search string for Java 7 Update 54 is 7.0.510.

Type the version number in the ‘Find what’ field and click ‘Find Next’.

Once you click the ‘Find Next’ button, it will find the right registry key and highlight the version value inside the key.

Just, right-click the registry key in the left panel and select ‘Delete’. 

Then, click ‘Yes’ to confirm the deletion of the registry key.

Uninstalling Java through a third-party Uninstaller Software

You can also uninstall Java via a reliable third-party uninstaller software such as Revo Uninstaller, IObit Uninstaller, Advanced Uninstaller Pro, Wise Program Uninstaller, etc. When you remove Java with these uninstallers, they will automatically clean all related and leftover files of Java. Here’s how you do this:

First, download and install one of the uninstaller software on your device. Then launch the app. Here, we are using the Revo uninstaller. Select the Java version you wish to remove and click ‘Uninstall’.

Next, choose whether you want to create a system restore point and select ‘Continue’.

Then, select ‘Yes’ to confirm.

After the program’s uninstaller is finished, click the ‘Scan’ button to scan for residual and leftover files.

Then, select all the leftover files and click ‘Delete’. Follow the same steps to remove other Java components from the PC.

In case you want to install the latest version of Java after removing the outdated version, go to the Java official website, download, and install.

Confirming Java Has Been Uninstalled

If you want to make sure Java (Java Development Kit, Java Runtime Environment) has been completely removed from your computer, you can use the -version command like we did before to confirm it.

Open Command Prompt, type java -version, and then press Enter.

When you do that you will get the “‘java’ is not recognized as an internal or external command, operable program or batch file” error message, which means that all versions of Java have been uninstalled completely from your Windows 11 PC.


That’s it. With this detailed guide, you have all your bases covered when it comes to uninstalling Java on your Windows 11 system.