I am using OS X EL Capitan 10.11.
I set JAVA_Home in ~/.bashrc
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/"
export PATH=$JAVA_HOME/bin:$PATH
Seems like nothing worked even I closed and re-opened terminal. It still says
+======================================================================+
| Error: JAVA_HOME is not set and Java could not be found |
+----------------------------------------------------------------------+
I thought it was same like Linux but it looks like it is not. Is there anywhere else I should export JAVA_HOME?