add java configuration method for Mac