Search for alternative java if JAVA_HOME is defined
Merge pull request #491 from tatref/JAVA_HOME-fix

Search for alternative java if JAVA_HOME is defined #488