This is how I finally found a way to find the current path of java 1.8 installation on osx yosemite.
run on the terminal:
/usr/libexec/java_home
for me it was:
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
then on your bash_profile add:
export /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home