public static void main(String[] args) {
		HashMap ht = createParameterTable(args);
		String className = (String) ht.get("code");
		Class mainClass = null;
		Program program = null;
		if (className == null) {
			try {
				className = System.getProperty("java.main");
			} catch (Exception ex) {
				/* Empty */
			}
		}
		if (className == null) {
			String commandLine = getCommandLine();
			className = readMainClassFromCommandLine(commandLine);
		}
		if (className != null) {
			if (className.endsWith(".class")) {
				className = className.substring(0, className.length() - 6);
			}
			className = className.replace('/', '.');
			try {
				mainClass = Class.forName(className);
			} catch (ClassNotFoundException ex) {
				/* Empty */
			}
		}
		if (mainClass != null) {
			try {
				Object obj = mainClass.newInstance();
				if (obj instanceof Program) {
					program = (Program) obj;
					program.setStartupObject(null);
				} else {
					className = (String) ht.get("program");
					if (className == null) {
						throw new ErrorException("Main class does not specify a program");
					}
					program = (Program) Class.forName(className).newInstance();
					program.setStartupObject(obj);
				}
			} catch (IllegalAccessException ex) {
				/* Empty */
			} catch (InstantiationException ex) {
				/* Empty */
			} catch (ClassNotFoundException ex) {
				/* Empty */
			}

		}
		if (program == null) throw new ErrorException("Cannot determine the main class.");
		program.setParameterTable(ht);
		program.start();
	}