Search for alternative java if JAVA_HOME is defined #488

Fixes #488 (ability to use alternative java with JAVA_HOME env variable)