Requiring java only when using ruby