locale = new Locale("de", "DE");
    public static void main(String[] args) {        System.out.println(PROGRAM_NAME + " v" + PROGRAM_VERSION                + " (c) 2005 by " + PROGRAM_AUTHOR);        Thread.currentThread().setPriority(5);        boolean fetchCalls = false;        boolean clearList = false;        boolean csvExport = false;        String csvFileName = "";        boolean enableInstanceControl=true;        CLIOptions options = new CLIOptions();        options.addOption('h', "help", null, "This short description");        options.addOption('v', "verbose", null, "Turn on debug information");        options.addOption('v', "debug", null, "Turn on debug information");        options.addOption('s', "systray", null, "Turn on systray support");        options.addOption('n', "nosystray", null, "Turn off systray support");        options.addOption('f', "fetch", null, "Fetch new calls and exit");		options.addOption('d', "delete_on_box", null,				"Delete callerlist of the Fritz!Box.");        options.addOption('b', "backup", null, "Creates a backup of all xml-Files in the directory 'backup'");        options.addOption('c', "clear_list", null,                "Clears Caller List and exit");        options.addOption('e', "export", "filename",                "Fetch calls and export to CSV file.");        options.addOption('l', "logfile", "filename",                "Writes debug messages to logfile");        options.addOption('p', "priority", "level",                "Set program priority [1..10]");        Vector foundOptions = options.parseOptions(args);        Enumeration en = foundOptions.elements();        while (en.hasMoreElements()) {            CLIOption option = (CLIOption) en.nextElement();            switch (option.getShortOption()) {            case 'h':                System.out.println("Call: java -jar jfritz.jar [Options]");                options.printOptions();                System.exit(0);                break;            case 'v':                Debug.on();                break;            case 'b':                doBackup();                break;            case 's':                JFritz.SYSTRAY_SUPPORT = true;                break;            case 'f':            	enableInstanceControl = false;            	fetchCalls = true;                break;            case 'e':            	enableInstanceControl = false;            	csvExport = true;                csvFileName = option.getParameter();                if (csvFileName == null || csvFileName.equals("")) {                    System.err.println("Parameter not found!");                    System.exit(0);                }                break;            case 'd':				// enableInstanceControl = false; // unntig, GUI wird nicht gestartet				Debug.on();				clearCallsOnBox();                System.exit(0);                break;            case 'c':            	enableInstanceControl = false;            	clearList = true;                break;            case 'l':                String logFilename = option.getParameter();                if (logFilename == null || logFilename.equals("")) {                    System.err.println("Parameter not found!");                    System.exit(0);                } else {                    Debug.logToFile(logFilename);                    break;                }            case 'n':                checkSystray = false;                break;            case 'p':                String priority = option.getParameter();                if (priority == null || priority.equals("")) {                    System.err.println("Parameter not found!");                    System.exit(0);                } else {                    try {                        int level = Integer.parseInt(priority);                        Thread.currentThread().setPriority(level);                        Debug.msg("Set priority to level " + priority);                    } catch (NumberFormatException nfe) {                        System.err                                .println("Wrong parameter. Only values from 1 to 10 are allowed.");                        System.exit(0);                    } catch (IllegalArgumentException iae) {                        System.err                                .println("Wrong parameter. Only values from 1 to 10 are allowed.");                        System.exit(0);                    }                    break;                }            default:                break;            }        }        new JFritz(fetchCalls, csvExport, csvFileName, clearList, enableInstanceControl);    }