ResinBoot(String []argv)
throws Exception
{
_args = new WatchdogArgs(argv);
Path resinHome = _args.getResinHome();
ClassLoader loader = ProLoader.create(resinHome, _args.is64Bit());
if (loader != null) {
System.setProperty("resin.home", resinHome.getNativePath());
Thread.currentThread().setContextClassLoader(loader);
Environment.init();
Vfs.initJNI();
resinHome = Vfs.lookup(resinHome.getFullPath());
_args.setResinHome(resinHome);
}
else {
Environment.init();
}
String jvmVersion = System.getProperty("java.runtime.version");
if ("1.6".compareTo(jvmVersion) > 0) {
throw new ConfigException(L().l("Resin requires Java 1.6 or later but was started with {0}",
jvmVersion));
}
// required for license check
System.setProperty("resin.home", resinHome.getNativePath());
// watchdog/0210
// Vfs.setPwd(_rootDirectory);
if (! _args.getResinConf().canRead()) {
throw new ConfigException(L().l("Resin/{0} can't open configuration file '{1}'",
VersionFactory.getVersion(),
_args.getResinConf().getNativePath()));
}
Path rootDirectory = _args.getRootDirectory();
Path dataDirectory = rootDirectory.lookup("watchdog-data");
ResinSystem system = new ResinSystem("watchdog",
rootDirectory,
dataDirectory);