@Override
    public void processJRubyOption(final String jrubyOption)
            throws JRubyInvalidRuntimeException, UnrecognizedJRubyOptionException, NotWorkingJRubyOptionException {
        final Object rubyInstanceConfig = this.getRubyInstanceConfig();

        if (jrubyOption.charAt(0) != '-') {
            throw new UnrecognizedJRubyOptionException();
        }

        for (int index = 1; index < jrubyOption.length(); ++index) {
            switch (jrubyOption.charAt(index)) {
                case '-':
                    if (jrubyOption.equals("--dev")) {
                        // They are not all of "--dev", but they are most possible configurations after JVM boot.
                        try {
                            if (this.method_force_LString != null && this.field_COMPILE_INVOKEDYNAMIC != null) {
                                // NOTE: Options is global.
                                this.method_force_LString.invoke(this.field_COMPILE_INVOKEDYNAMIC.get(null), "false");
                            }
                            if (this.method_setCompileMode_LCompileMode != null && this.const_CompileMode_OFF != null) {
                                this.method_setCompileMode_LCompileMode.invoke(
                                        rubyInstanceConfig, this.const_CompileMode_OFF);
                            }
                        } catch (IllegalAccessException | InvocationTargetException ex) {
                            throw new NotWorkingJRubyOptionException(ex);
                        }
                        return;
                    } else if (jrubyOption.equals("--client")) {
                        throw new NotWorkingJRubyOptionException();
                    } else if (jrubyOption.equals("--server")) {
                        throw new NotWorkingJRubyOptionException();
                    }
                    throw new UnrecognizedJRubyOptionException();
                default:
                    throw new UnrecognizedJRubyOptionException();
            }
        }
    }
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