$java -version
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
I found the same error as my case at the stackoverflow.
This happens when $JAVA_HOME is not set correctly. In my case, the following works form me.
export JAVA_HOME="$(/usr/libexec/java_home)"
My environment is as follows:
- OS X 10.9
- Java 1.7.0_25 (installed by brew)