.cab
files that can be used for autodownloading them.java -version
in the terminal, it showed:java -version
as well. It also showed the same error:java -version
gives you an error and a popupexport JAVA_HOME='/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'
java -version
now gives you java version '1.7.0_45'
export JAVA_HOME
line in your .bashrc
to have java
permanently in your Terminal:sudo ln -snf
mentioned in the answer above:JAVA_HOME
to point to where jdk_1.7.0_xx.jdk
was installed:PATH
:sudo ln -nsf /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
Java SE Development Kit 8
, from SE downloads and installed the .dmg file. And when typing java -version
in terminal the following was displayed:java -version
.