fixed method by which java home is found