File file = new File(filename);
filename = file.getAbsolutePath();
try {
Server server;
String configFile = System.getProperty("anvil.configFile");
if (configFile != null) {
ConfigReader reader = new ConfigReader(null, new File(configFile));
server = reader.parse();
} else {
server = new Server(null);
CompilerPreferences compiler = new CompilerPreferences(server);
compiler.setUseTimestamp(false);
compiler.setStoreImages(false);
compiler.setClassPath("/var/tmp/");
server.configure(compiler);
}
server.setShouldInvalidate(false);
server.setContainer("file:/");
if (namespace != null) {
server.setNamespace(namespace);
}
int severity = verbose ? anvil.Log.DEBUG : anvil.Log.ERROR;
anvil.Log.log().setSeverity(severity);
LoggingPreferences logprefs = new LoggingPreferences(server);
logprefs.setLevel(severity);
server.configure(logprefs);
server.start();
Zone zone = server.resolveZone(filename);
Address address = zone.resolve(filename);
Module script = server.getCache().load(address).getModule();
Product product = new Product(address, System.out, script);
Array arguments = new Array();
while(index < length) {
arguments.append(new AnyString(args[index++]));
}