If you face trouble with setting up JAVA_HOME in mac OSX, here is the solution. Mavericks picks a path to Java 1.6 version as the default JAVA_HOME version.
To change it
- Go to /System/Library/Frameworks/JavaVM.framework/Versions
- Remove the CurrentJDK link
- add new link to /Library/Java/JavaVirtualMachines/jdk<version>.jdk/Contents/Home as CurrentJDK
cd /System/Library/Frameworks/JavaVM.framework/Versions sudo rm -rf CurrentJDK sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents CurrentJDK