Fixed loading "gateways" from Oracle Java bundle

Oracle Java is no more setting user.dir inside bundle so we must ensure that gateways are loaded correctly on OS X.