I have installed jdk1.8.0_121 already and JAVA_HOME seems correct. But when I open terminal, it always reminds me "Unable to find any JVMs matching version "1.8.0_40"".
jdk1.8.0_40 was installed Previously but I hava already uninstalled this version.
Does anyone know how to remove this annoying reminder? Thanks a lot.
i solved this using this command in terminal
brew install --cask homebrew/cask-versions/adoptopenjdk8
MacOS X does not come with Java Development Kits (JDKs) pre-installed.
Run java -version
in the terminal and you may be prompted to install Java. Unless you already have JVM installed, in which case you will see the build version number.
Next, you will be prompted to visit the Java SE Development Kit Downloads page. Download one of the JDK (Java Development Kits) with a file extension ending in <filename>.tar.gz
.
Then run tar -xf <filename>.tar.gz
.
Rename the newly created directory to JAVA_HOME
.
@sideshowbarker, you're right. I checked all shell initialization files and found the java version was set as 1.8.0_40 in /etc/profile
.
Thanks again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With