public static Map<String, ICommand> loadCommands(String cfgFile)
			throws IOException {
		Map<String, ICommand> cmds = new TreeMap<String, ICommand>();
		final Properties prop = new Properties();
		prop.loadFromXML(new FileInputStream(cfgFile));
		for (Entry<Object, Object> e : prop.entrySet()) {
			String key = (e.getKey() + "").trim();
			String[] value = (e.getValue() + "").split(" ", 2);
			String cmdStr = value[0].trim();
			String argsStr = value[1].trim();
			Class<?> cmdCl = findCmd(cmdStr);
			if (cmdCl == null)
				throw new UnsupportedOperationException("I don't know '"
						+ cmdStr + "'!");
			try {
				Constructor<?> constr = cmdCl.getConstructor(String.class);
				Object obj = constr.newInstance(argsStr);
				ICommand cmd = (ICommand) obj;
				cmds.put(key, cmd);
			} catch (Exception ex) {
				throw new RuntimeException("loadCommands", ex);
			}
		}
		return cmds;
	}