-
-
Save schnell18/bcb9833f725be22f6acd01f94b486392 to your computer and use it in GitHub Desktop.
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
Thanks!
Save me a lot of time.
woo hoo! thanks! very helpful!
i found a simplest way.
for macOS high sierra removing java 9:
delete the java folder you find in the dir shown to you after executing:
/usr/libexec/java_home -V
use "Go to" in finder and copy and paste the dir to get there
My hero.
$ sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9*.jdk/
$ sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
$ sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
$ /usr/libexec/java_home -V
Unable to find any JVMs matching version "(null)".
Matching Java Virtual Machines (0):
Default Java Virtual Machines (0):
No Java runtime present, try --request to install
On Mac Terminal
echo $JAVA_HOME
on bash_profile place the below line with your required version
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_{ should be your version }.jdk/Contents/Home
export $PATH=$JAVA_HOME/bin:$PATH
Cheers, this saved me a hassle of reverting back to an older Java version.
I ended up installing java via homebrew brew tap caskroom/versions
then brew cask install java8
more here https://www.lonecpluspluscoder.com/2017/10/08/installing-other-versions-of-the-java-jdk-via-homebrew/
and adding it to JAVA_HOME similar to others here.
Works like a charm!
Many Thanks!!!
Thanks :)
Awesome. Thanks a lot.
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9(your version).jdk
thanks for help!
You sir are a LEGEND!
in Turkish we say "ADAMSIN"
Thank you so much!
According to this you can also remove sudo rm -fr ~/Library/Application\ Support/Oracle/Java
+1 super helpful @mgela @schnell18