In relation to this question ... the solutions offered don't work for me. First, folder /Library/Java/Extensions
is empty and ~/Library/Java
folder does not exist on my OS X Yosemite 10.10.1 system.
I did do a Java update to 1.8 from the Oracle site, and got this part to work:
java -version returns:
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
, but
javac -version returns a no program found error:
Unable to locate an executable at "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/javac" (-1)
The directory /Library/Java/JavaVirtualMachines/
is also empty.
Lastly, if I do:
/usr/libexec/java_home -v 1.8.0_31 --exec javac -version
Unable to find any JVMs matching version "1.8.0_31".
javac 1.6.0_65
Notice how --exec javac -version
in the previous one-liner does find the javac, but it reports the old 1.6. How do I fix my paths so that javac works? Here is my PATH and JAVA_HOME:
mbp_host$ echo $JAVA_HOME
returns
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
mbp_host$ echo $PATH
returns
/usr/local/homebrew/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin