BUGFIX: We shouldn't rely on the externally set JAVA_HOME, as this script may erroneously call itself. Instead, provide OS-specific Java detection code.
BUGFIX: sticking to Java 1.6. Scripts supporting other versions of Java can be created separately