Worked around OSX Mavericks missing java6 and added support for linux JAVA_HOME