}
}
}
}
private static void load0() throws java.io.IOException {
final ClassLocator locator = new ClassLocator();
//1. parse config.xml
final ConfigParser parser = new ConfigParser();
parser.parseConfigXml(null); //only system default configs
//2. process lang.xml (no particular dependency)
for (Enumeration en = locator.getResources("metainfo/zk/lang.xml");
en.hasMoreElements();) {
final URL url = (URL)en.nextElement();
if (log.debugable()) log.debug("Loading "+url);
try {
final Document doc = new SAXBuilder(true, false, true).build(url);
if (ConfigParser.checkVersion(url, doc, true))
parseLang(doc, locator, url, false);
} catch (Exception ex) {
log.error("Failed to load "+url, ex);
throw UiException.Aide.wrap(ex, "Failed to load "+url);
//abort since it is hardly to work then
}
}
//3. process lang-addon.xml (with dependency)
final List xmls = locator.getDependentXMLResources(
"metainfo/zk/lang-addon.xml", "addon-name", "depends");
for (Iterator it = xmls.iterator(); it.hasNext();) {
final ClassLocator.Resource res = (ClassLocator.Resource)it.next();
try {
if (ConfigParser.checkVersion(res.url, res.document, true))