Java is known for its security flaws — to this day, over a hundred vulnerabilities have been identified. The good news is that unless you’re running an application that requires Java or visiting websites that use the language, you don’t really need it on your computer. You can uninstall Java on a Mac using MacKeeper's Smart Uninstaller.
When you remove apps from your Mac, it’s crucial to remove all their leftovers. To remove Java, we recommend using MacKeeper’s Smart Uninstaller. Our tool quits memory-draining apps, removes plugins, browser extensions, and leftover files in a few clicks.
Run MacKeeper and select Smart Uninstaller from the left pane.
Click the Start Scan button.
Check the list with the files to remove. Select what to delete and click Remove Selected.
Step 1. MacKeeper > Smart Uninstaller > Start ScanStep 2. The app scans your MacStep 3. Choose items to delete > Remove SelectedStep 4. Click Remove
Uninstall Java using Terminal
The most straightforward way to remove Java from a Mac is by using the Terminal command line. Before you do anything, make sure you have administrator privileges on your computer, which enables you to make changes to the system. Once you know you’re an admin, use the following instructions to delete any version of Java.
How to remove Java from a Mac with Terminal step-by-step:
Go to Finder and open Terminal by following Applications > Utilities >Terminal
Copy and paste the following commands in the Terminal line:
4. Enter your user account password and press Enter again.
Restore Apple Java after uninstalling
You can reinstall Java 7 and later versions on a Mac by using the link on the official Java website. The recommended version is Java 8 — it’s important to keep the application updated to minimize security threats. Make sure that you have:
Admin privileges
A fast 64-bit browser such as Safari
Intel core
macOS 10.7.3 and above
What to do after downloading the installer:
Make sure you downloaded the correct file. For the latest version of Java 8, it’s jre-8u65-macosx-x64.pkg.
Double-click on the file to open it.
Double click on the icon to launch the Wizard.
Click past the windows until the installation is launched.
Wait until the process is complete and move the Install Wizard to Trash.
Unfortunately, there are still no certified versions of Java and JDK for macOS Catalina. This is due to stricter security checks by Gatekeeper. You can modify your security preferences to install non-notarized software such as Java and JDK, but beware of the risks that it takes.
Uninstall JDK
There can be multiple Java development kits on your Mac, or, more often, none at all. You can uninstall JDK via Terminal with just a few command prompts.
JDK uninstallation process:
First, check if there’s a JDK in your directory. Copy and paste cd /Library/Java/JavaVirtualMachines and press Enter to open it.
Type in ls and press Enter to see the contents of the directory.
If you see a jdk file, use the rm prompt to delete it. Type in sudo rm -rf jdk1 and press the Tab key to complete the command.
Press Enter to erase the file.
Make sure Java is gone
You can check that JDK is fully erased from your computer by typing in java in the Terminal command line and pressing Enter. The message “No Java runtime present, requesting install” indicates success.
Check that you’re deleted Java on a Mac in System Preferences. If the Java icon is gone from the bottom pane, you have uninstalled the software.
FAQ
How do I download Java Kit for Mac?
You can find and download a Java development kit for macOS on JDK’s official website. However, bear in mind that you must use a 64-bit browser.
Should I uninstall Java?
You should always keep all of your software and applications up to date and uninstall the items that you don’t use. If you don’t utilize apps and websites that run on Java, we recommend you uninstall it.
How do I know if Java is installed on my Mac?
To check if your Mac has Java, go to the Apple menu in the top left corner of the screen and open System Preferences. If you don’t see a Java icon in the bottom pane, Java 7 or later is not installed on your computer.
Alternatively, you can type in java -version in the Terminal command line to see the information about the version of Java currently installed on your Mac. If there is no Java, you will get a “No Java runtime present” message.
Is Java safe for Mac?
Java does impose some security threats for users of all operating systems. However, the risk diminishes if you keep the software up to date. If you’ve decided to download Java on your Mac, make sure to only use the official website.
We respect your privacy and
use cookies
for the best site experience.
Privacy Preferences Center
We use cookies along with other tools to give you the best possible experience while using the
MacKeeper website. Cookies are small text files that help the website load faster. The cookies we
use don’t contain any type of personal data meaning they never store information such as your
location, email address, or IP address.
Help us improve how you interact with our website by accepting the use of cookies. You can change
your privacy settings whenever you like.
Manage consent
All cookies
These cookies are strictly necessary for enabling basic website functionality (including page
navigation, form submission, language detection, post commenting), downloading and purchasing
software. The website might malfunction without these cookies.