Nashorn integration to write plugins in JS