Align ONOS_HOME detection

- Detect default ONOS_HOME in a same way as onos.sh.
- export detected path to be used by child scripts.

Change-Id: Ic44fd18d63acd5906a8cc9dc8a45f15f51d31477
diff --git a/build-ramcloud-java-bindings.sh b/build-ramcloud-java-bindings.sh
index 3e3e48d..8237bd6 100755
--- a/build-ramcloud-java-bindings.sh
+++ b/build-ramcloud-java-bindings.sh
@@ -4,8 +4,8 @@
 
 set -x
 
-ONOS_HOME=${ONOS_HOME:-~/ONOS}
-RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud}
+export ONOS_HOME=${ONOS_HOME:-$(cd `dirname $0`; pwd)}
+export RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud}
 
 ${ONOS_HOME}/ramcloud-build-scripts/build_jni_so.sh