private static Object getStaticField_Constants(final Class<?> class_Constants, final String fieldName) {
        final Field field;
        try {
            field = class_Constants.getField(fieldName);
        } catch (NoSuchFieldException ex) {
            return null;  // TODO: Log.
        }

        try {
            return field.get(null);
        } catch (IllegalArgumentException | IllegalAccessException ex) {
            return null;  // TODO: Log.
        }
    }
Indirects onto JRuby not to require JRuby classes directly.

It calls methods of ScriptingContainer through reflection.

This trick enables Embulk:

<ul>
<li>To load a JRuby runtime (jruby-complete-*.jar) specified at runtime out of embulk-*.jar.
<li>To switch versions of JRuby without releasing or repackaging.
<li>To distribute Embulk without JRuby runtimes embedded.
</ul>
embulk-core/src/main/java/org/embulk/jruby/ScriptingContainerDelegateImpl.java