Uninstalling Oracle Java from Windows Server is a straightforward process. You can achieve this through the Control Panel or by using the command prompt.
Using Control Panel
- Open Control Panel: Search for "Control Panel" in the Windows search bar and open it.
- Navigate to Programs: Select "Programs" or "Programs and Features" depending on your Windows version.
- Locate Java: Scroll through the list of installed programs and find the relevant Java version you want to remove. It might be labeled as "Java SE Development Kit" or "Java Runtime Environment".
- Uninstall Java: Right-click on the Java entry and select "Uninstall". Follow the on-screen prompts to complete the uninstallation process.
Using Command Prompt
- Open Command Prompt: Press Windows key + R to open the Run dialog box. Type "cmd" and press Enter.
- Navigate to Java installation directory: Use the "cd" command to navigate to the directory where Java is installed. For example, if it's installed in "C:\Program Files\Java\jdk-11.0.12", you would type:
cd C:\Program Files\Java\jdk-11.0.12
and press Enter. - Run the uninstall script: Execute the uninstall script by typing:
uninstall.exe
and pressing Enter. - Follow prompts: Follow the on-screen prompts to complete the uninstallation process.
Important Considerations
- Multiple Java Versions: If you have multiple versions of Java installed, ensure you uninstall the specific version you want to remove.
- Check for Dependencies: Before uninstalling Java, consider if any other programs or applications rely on it. If so, uninstalling Java might cause those programs to malfunction.
Remember to restart your server after uninstalling Java to ensure all changes are applied correctly.