private void extractArguments(String[] args) {
	String testArgsString = Config.getString("AutoGrader.testArgs");
	if (testArgsString == null) {
		testArgsString = "";
	}
	
	for (int i=0; i<args.length; ) {
	    String arg = args[i++];
	    if (arg.length() > 0 && arg.charAt(0) == '-') {
		if (arg.equals("-#")) {
		    Lib.assertTrue(i < args.length,
			       "-# switch missing argument");
		    testArgsString = args[i++];
		}
	    }
	}

	StringTokenizer st = new StringTokenizer(testArgsString, ",\n\t\f\r");

	while (st.hasMoreTokens()) {
	    StringTokenizer pair = new StringTokenizer(st.nextToken(), "=");

	    Lib.assertTrue(pair.hasMoreTokens(),
		       "test argument missing key");
	    String key = pair.nextToken();

	    Lib.assertTrue(pair.hasMoreTokens(),
		       "test argument missing value");
	    String value = pair.nextToken();

	    testArgs.put(key, value);
	}	
    }