Fixes for in Unit tests if JAVA_HOME isn't set.