Remove the “Java” folder; Empty the Trash on the Mac as usual; Java will be removed completely this way. The Finder based approach is the easier and safer way to uninstall Java from a Mac, though Mac users can also remove Java and JRE via the command line as well. The Blog How to: Fix Java Command-Line Tool Pop-Up on Mac OS Truong Nguyen August 29, 2017 How-To After upgrading to a newer version of Mac OS X (Yosemite 10.10 and El Capitan 10.11) or macOS (Sierra 10.12 and High Sierra 10.13), you may end up getting an annoying new pop-up message whenever you start your computer. It basically says that if you need to compile or execute a Java application with an older version of the JDK (for example 1.4 or 1.5), you can do it using the 1.6 because it is backwards compatible. To do it so you will need to add the parameter -source 1.5 and/or -target 1.5 in the javac options or in your IDE.
If, after installing Java for OS X 2014-001 and the latest version of Java 7 from Oracle, you want to disable Java 7 and re-enable the Apple-provided Java SE 6 web plug-in and Web Start functionality, follow these steps.
Note: You must be logged in as an administrator. If prompted for your administrator password after a command, enter it and then press the Return or Enter key.
- Open Terminal, located in the Utilities folder.
- Enter this command, then press the Return or Enter key:
- Enter this command, then press the Return or Enter key:
- Enter this command, then press the Return or Enter key:
- To re-enable Java SE 6 Web Start, enter this command, then press the Return or Enter key:
Learn more
The following steps will undo the above commands and restore Java 7 in OS X Lion and later.
- Disable Java SE 6 Web Start opening:
- Enter this command, then press the Return or Enter key:
- When prompted, enter your administrator password, then press the Return or Enter key.
- Re-enable the Java 7 applet plug-in bydownloading and reinstalling the latest version of Oracle Java 7 JRE.
My CPU usage suddenly rose up to 80-100%. Couldn't find the trigger, so I just totally deleted Java from my Mac. Now I keep getting this popup:
To use the 'java' command-line tool you need to install a JDK.
Click 'More info...' to visit the Java Developer Kit download website.
How can I know which program is trying to run Java? Keep getting this every few seconds now.
ArjanDo I Need A Java Command Tool For My Machine
2 Answers
For my sister this was caused by Facebook videochat, with a slightly different message:
To view this web content, you need to install the Java Runtime Environment.
Click 'More info...' to visit the website for the Java Runtime Environment.
We debugged quite randomly, and could not find a way to tell what triggered this dialog. But the following Apple Support Communities post explained how to find it by trial and error:
Here are the steps I used to correct, as even after removal from Launch control it kept returning on reboot:
- Open a Terminal Prompt
Show non Apple startup Agents. At $ execute
This will look something like the following.
One of the returned items is likely your issue, mine was also
com.facebook.videochat.USERNAME.updater
Change to the Agents directory,
cd ~/Library/LaunchAgents/
I also had to remove the actual agent files, as it kept re-appearing on reboot. You can view those on your system and remove. List out the items in directory:
ls
From
~/Library/LaunchAgents/
executeAlso remove from Launch control with
Exit and reboot
If I recall correctly then this videochat thing might also have been a plugin in her browser, which we then already removed earlier.
ArjanArjanTry this (setting JAVA_HOME to 'LibraryInternet Plug-InJavaAppletPlugin.pluginContentsHomebin'), after install Java from http://www.java.com/:
export JAVA_HOME=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/
export PATH=$JAVA_HOME/bin:$PATH
To make the new path stick permanently you need to create a .bash_profile file in your home directory and set the path there. This file control various Terminal environment preferences including the path:
cd
Move into home directory:
nano .bash_profile
Create the .bash_profile file with a command line editor called nano:
export JAVA_HOME=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/export PATH=$JAVA_HOME/bin:$PATH
Save the file in nano by clicking ‘control’ +’o’ and confirming the name of the file is .bash_profile by hitting return. And the ‘control’+’x’ to exit nano:
So now when the Terminal is relaunched or a new window made and you check the the path by:
echo $PATH
You will get the new path at the front followed by the default path locations, all the time
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin//bin:/usr/local/bin:/usr/bin :/bin:/usr/sbin:/sbin
If you have problems with:
export JAVA_HOME=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/
Change to this:
export JAVA_HOME=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home