public static void initCommandLineParameters(String[] args,
			LinkedList<Option> specified_options, String[] manditory_args) {
		Options options = new Options();
		if (specified_options != null)
			for (Option option : specified_options)
				options.addOption(option);
		
		Option option = null;
		
		OptionBuilder.withArgName("file");
		OptionBuilder.hasArg();
		OptionBuilder
				.withDescription("A file containing command line parameters as a Java properties file.");
		option = OptionBuilder.create("parameter_file");
		
		options.addOption(option);
		
		CommandLineParser command_line_parser = new GnuParser();
		CommandLineUtilities._properties = new Properties();
		try {
			CommandLineUtilities._command_line = command_line_parser.parse(
					options, args);
		} catch (ParseException e) {
			System.out.println("***ERROR: " + e.getClass() + ": "
					+ e.getMessage());
			HelpFormatter formatter = new HelpFormatter();
			formatter.printHelp("parameters:", options);
			System.exit(0);
		}
		if (CommandLineUtilities.hasArg("parameter_file")) {
			String parameter_file = CommandLineUtilities.getOptionValue("parameter_file");
			// Read the property file.
			try {
				_properties.load(new FileInputStream(parameter_file));
			} catch (IOException e) {
				System.err.println("Problem reading parameter file: " + parameter_file);
			}
		}
		
		boolean failed = false;
		if (manditory_args != null) {
			for (String arg : manditory_args) {
				if (!CommandLineUtilities.hasArg(arg)) {
					failed = true;
					System.out.println("Missing argument: " + arg);
				}
			}
			if (failed) {
				HelpFormatter formatter = new HelpFormatter();
				formatter.printHelp("parameters:", options);
				System.exit(0);
			}
				
		}
	}