private ScriptExecutor createScriptExecutor() {
        String className = null;
        ClassLoader loader = ScriptExecutor.class.getClassLoader();

        // 1. try the JVM-instance-wide system property
        try {
            className = System.getProperty(property);
        } catch (RuntimeException e) { /* normally fails for applets */
        }

        // 2. if that fails, try META-INF/services/
        if (StringUtils.isEmpty(className)) {
            try {
                String service = "META-INF/services/" + property;
                InputStream in;
                BufferedReader reader;

                if (loader == null) {
                    in = ClassLoader.getSystemResourceAsStream(service);
                } else {
                    in = loader.getResourceAsStream(service);
                }

                if (in != null) {
                    reader = new BufferedReader(new InputStreamReader(in, System.getProperty("file.encoding", "UTF-8")));
                    className = reader.readLine();
                    in.close();
                }
            } catch (Exception e) {
            }
        }

        // 3. Distro-specific fallback
        if (className == null) {
            className = DEFAULT_SCRIPT;
        }

        Class clazz = ReflectionHelper.forName(className, loader);
        return (ScriptExecutor) ReflectionHelper.newInstance(clazz);
    }