Java is a widely-used programming language known for its versatility in developing desktop applications, web services, mobile apps, games, and more. However, over time, Java has been associated with vulnerabilities, sluggish performance, and security risks due to viruses targeting it. As many platforms transition away from Java, you might decide it's time to remove it from your Windows 11 system, especially if it's no longer required for the applications you use. This guide will walk you through various methods to completely uninstall Java from your Windows 11 PC.

Uninstalling Java via Windows 11 Settings

Step 1: Open the Start menu and click on Settings to launch the Settings app.

Step 2: In the Settings app, navigate to the left pane and select Apps. Then, on the right side, click on Installed apps.

Step 3: Scroll through the list of installed applications to find the Java program, which may appear as Java 8 Update xxx (64-bit). Click on the three-dot icon next to it and choose Uninstall.

Step 4: A confirmation prompt will appear. Click on Uninstall again to proceed.

This action will remove Java from your system. If prompted by the User Account Control (UAC), click Yes to allow the changes. Once the uninstallation is complete, it's advisable to restart your computer to apply the changes.

Removing Java through the Control Panel

Step 1: Open the Start menu, type Control Panel in the search bar, and select it from the results.

Step 2: In the Control Panel, click on Uninstall a program under the Programs section.

Step 3: Locate the Java program you wish to uninstall. If you have multiple versions, choose the specific one you want to remove. Right-click on it and select Uninstall. Follow the on-screen instructions to complete the uninstallation process.

When prompted by the User Account Control dialog, click Yes to allow the uninstallation to proceed.

Note: After uninstalling Java or the Java Runtime Environment (JRE), any applications or websites that require Java to function will no longer work until you reinstall it.

Disabling Java Instead of Uninstalling

If you rarely use Java and prefer not to uninstall it completely, you can disable it to enhance your system's security while keeping it available for future use.

Step 1: Open the Start menu, search for Java, and select Configure Java from the search results.

Step 2: In the Java Control Panel, navigate to the Security tab. Uncheck the box next to Enable Java content for browser and Web Start applications. Click Apply, then OK to save the changes.

Identifying Installed Java Versions

Java allows multiple versions to coexist on the same system. If you need to remove a specific version, it's important to identify all the versions installed on your device.

Step 1: Open the Command Prompt by typing cmd in the Start menu and selecting Command Prompt.

Step 2: To view the current Java version, execute the following command:

java -version

Step 3: To find all installed Java executables and their locations, run:

where java

Using the Java Uninstall Tool for Outdated Versions

The Java Uninstall Tool is a dedicated utility provided by Oracle to help you remove outdated Java versions from your system. It scans for all installed versions and allows you to remove them easily.

Step 1: Download the Java Uninstall Tool from the official Java website. On the webpage, click on I Agree to the Terms and want to Continue to start the download.

Step 2: Once downloaded, run the JavaUninstallTool.exe file. Close all other applications and browser windows before proceeding.

Step 3: In the tool, click Agree to accept the license terms.

Step 4: The tool will display a list of installed Java versions. By default, outdated versions are selected. Choose the versions you wish to uninstall and click Next.

Step 5: The tool will proceed to uninstall the selected versions. Wait for the process to complete.

Step 6: Once done, click Close to exit the tool.

Uninstalling Java Development Kit (JDK)

If you have the Java Development Kit (JDK) installed and wish to remove it, you can do so through the Settings app.

Step 1: Open the Settings app by clicking on the Start menu and selecting Settings. Then, navigate to Apps on the left pane.

Step 2: Click on Installed apps on the right. Find the Java Development Kit from the list, click the three-dot icon next to it, and select Uninstall. Confirm by clicking Uninstall again and follow any additional prompts.

Removing Java from Environmental Variables

Even after uninstalling Java, some system variables may remain, which can cause conflicts with future installations or applications. It's important to remove these variables to ensure your system is clean.

Step 1: Right-click on the Start menu and select System to open the About settings.

Step 2: In the About section, scroll down and click on Advanced system settings.

Step 3: In the System Properties window, under the Advanced tab, click on Environment Variables...

Step 4: In the Environment Variables window, under System variables, select Path and click Edit.

Step 5: Identify any paths related to Java. Select each Java-related path and click Delete to remove them.

Step 6: Click OK to close each window and save the changes.

Deleting Java Directories Manually

If the uninstallation did not remove all Java files, or if Java does not appear in the list of installed programs, you can manually delete the Java files from your system.

Navigate to the following directories and delete the Java-related folders:

  • 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 Registry Entries

Residual registry entries can interfere with future Java installations or system performance. Cleaning up these entries ensures a complete removal.

Step 1: Press Win + R to open the Run dialog box. Type regedit and press Enter to open the Registry Editor.

Step 2: Navigate to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Step 3: Click on the Uninstall folder. Then, go to Edit > Find, or press Ctrl + F.

Step 4: Enter the version number of the Java installation you wish to remove (e.g., 7.0.510 for Java 7 Update 51) and click Find Next.

Step 5: Once the matching registry key is found, right-click on it in the left pane and select Delete.

Step 6: Confirm the deletion by clicking Yes in the prompt.

Using Third-Party Uninstaller Software

Alternatively, you can use third-party uninstaller tools like Revo Uninstaller, IObit Uninstaller, or Wise Program Uninstaller. These programs can remove Java and its residual files effectively.

Step 1: Download and install your preferred uninstaller software.

Step 2: Launch the uninstaller and select the Java version you wish to remove. Click on Uninstall.

Step 3: Follow the prompts to create a system restore point if desired, and continue with the uninstallation.

Step 4: Confirm any additional prompts to proceed with the uninstallation.

Step 5: After the uninstaller removes Java, it will scan for any leftover files or registry entries. Select all the residual items and click Delete to remove them completely.

If you plan to reinstall Java later, visit the official Java website to download the latest version.

Verifying Java Uninstallation

To confirm that Java has been completely removed from your system, you can use the Command Prompt.

Step 1: Open the Command Prompt.

Step 2: Type java -version and press Enter.

If Java has been uninstalled successfully, you will see the message: 'java' is not recognized as an internal or external command, operable program or batch file.


By following these steps, you can ensure that Java is completely removed from your Windows 11 system, enhancing your computer's performance and security.