String[] userModulePath = userModules.toArray(new String[userModules.size()]);
config = new RingoConfig(home, userModulePath, systemModulePath);
boolean hasPolicy = System.getProperty("java.security.policy") != null;
config.setPolicyEnabled(hasPolicy);
config.setWrapFactory(hasPolicy ? new SecureWrapFactory() : new RingoWrapFactory());
config.setMainScript(scriptName);
config.setArguments(scriptArgs);
config.setOptLevel(optlevel);
config.setBootstrapScripts(bootScripts);
config.setDebug(debug);