System.out.println("Call: java -jar jfritz.jar [Options]");
System.out.println("Usage: java -jar jfritz.jar [Options]");
    public static void main(String[] args) {        System.out.println(PROGRAM_NAME + " v" + PROGRAM_VERSION //$NON-NLS-1$                + " (c) 2005 by " + PROGRAM_AUTHOR); //$NON-NLS-1$        Thread.currentThread().setPriority(5);        boolean fetchCalls = false;        boolean clearList = false;        boolean csvExport = false;		boolean foreign = false;        String csvFileName = ""; //$NON-NLS-1$        boolean enableInstanceControl = true;                //TODO: If we ever make different packages for different languages        //change the default language here        locale = new Locale("de", "DE"); //$NON-NLS-1$,  //$NON-NLS-2$                CLIOptions options = new CLIOptions();        options.addOption('h', "help", null, "This short description"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$        options.addOption('v', "verbose", null, "Turn on debug information"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$        options.addOption('v', "debug", null, "Turn on debug information"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$        options.addOption('s', "systray", null, "Turn on systray support"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$        options.addOption('n', "nosystray", null, "Turn off systray support"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$        options.addOption('f', "fetch", null, "Fetch new calls and exit"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$		options.addOption('d', "delete_on_box", null, //$NON-NLS-1$,  //$NON-NLS-2$				"Delete callerlist of the Fritz!Box."); //$NON-NLS-1$        options.addOption('b', "backup", null, "Creates a backup of all xml-Files in the directory 'backup'"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$        options.addOption('c', "clear_list", null, //$NON-NLS-1$,  //$NON-NLS-2$                "Clears Caller List and exit"); //$NON-NLS-1$        options.addOption('e', "export", "filename",  //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$                "Fetch calls and export to CSV file."); //$NON-NLS-1$        options.addOption('z', "exportForeign", null, //$NON-NLS-1$,  //$NON-NLS-2$				"Write phonebooks compatible to BIT FBF Dialer and some other callmonitors."); //$NON-NLS-1$		        options.addOption('l', "logfile", "filename", //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$                "Writes debug messages to logfile"); //$NON-NLS-1$,        options.addOption('p', "priority", "level", //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$                "Set program priority [1..10]"); //$NON-NLS-1$        options.addOption('i',"lang", "language","Set the display language, currently supported: german, english"); //$NON-NLS-1$,  //$NON-NLS-2$,  //$NON-NLS-3$, //$NON-NLS-4$        options.addOption('w', "without-control", null, //$NON-NLS-1$,  //$NON-NLS-2$         		"Turns off multiple instance control. DON'T USE, unless you know what your are doing"); //$NON-NLS-1$                Vector foundOptions = options.parseOptions(args);        Enumeration en = foundOptions.elements();        while (en.hasMoreElements()) {            CLIOption option = (CLIOption) en.nextElement();            switch (option.getShortOption()) {            case 'h': //$NON-NLS-1$                System.out.println("Call: java -jar jfritz.jar [Options]"); //$NON-NLS-1$                options.printOptions();                System.exit(0);                break;            case 'v': //$NON-NLS-1$                Debug.on();                break;            case 'b': //$NON-NLS-1$                doBackup();                break;            case 's': //$NON-NLS-1$                JFritz.SYSTRAY_SUPPORT = true;                break;            case 'z':            	foreign = true;                break;					            case 'f':            	enableInstanceControl = false;            	fetchCalls = true;                break;            case 'e':            	enableInstanceControl = false;            	csvExport = true;                csvFileName = option.getParameter();                if (csvFileName == null || csvFileName.equals("")) { //$NON-NLS-1$                    System.err.println(JFritz.getMessage("parameter_not_found")); //$NON-NLS-1$                    System.exit(0);                }                break;            case 'd': //$NON-NLS-1$				// enableInstanceControl = false; // ungtig, GUI wird nicht gestartet				Debug.on();				clearCallsOnBox();                System.exit(0);                break;            case 'c': //$NON-NLS-1$            	enableInstanceControl = false;            	clearList = true;                break;            case 'l': //$NON-NLS-1$                String logFilename = option.getParameter();                if (logFilename == null || logFilename.equals("")) { //$NON-NLS-1$                    System.err.println(JFritz.getMessage("parameter_not_found")); //$NON-NLS-1$                    System.exit(0);                } else {                    Debug.logToFile(logFilename);                    break;                }            case 'n': //$NON-NLS-1$                checkSystray = false;                break;            case 'i': //$NON-NLS-1$            	String language = option.getParameter();            	if(language == null){            		System.err.println(JFritz.getMessage("invalid_language")); //$NON-NLS-1$            		System.err.println("Deutsch: german"); //$NON-NLS-1$            		System.err.println("Englisch: english"); //$NON-NLS-1$            		System.exit(0);            	}else if(language.equals("english")){ //$NON-NLS-1$            		locale = new Locale("en", "US"); //$NON-NLS-1$,  //$NON-NLS-2$            	}else if(language.equals("german")){ //$NON-NLS-1$            		locale = new Locale("de", "DE"); //$NON-NLS-1$,  //$NON-NLS-2$            	}else{            		System.err.println(JFritz.getMessage("invalid_language")); //$NON-NLS-1$            		System.err.println("Deutsch: german"); //$NON-NLS-1$            		System.err.println("Englisch: english"); //$NON-NLS-1$            		System.exit(0);            	}            	break;            case 'w': //$NON-NLS-1$            	enableInstanceControl = false;            	System.err.println("Turning off Multiple instance control!"); //$NON-NLS-1$            	System.err.println("You were warned! Data loss may occur."); //$NON-NLS-1$            	break;            	            case 'p': //$NON-NLS-1$                String priority = option.getParameter();                if (priority == null || priority.equals("")) { //$NON-NLS-1$                    System.err.println(JFritz.getMessage("parameter_not_found")); //$NON-NLS-1$                    System.exit(0);                } else {                    try {                        int level = Integer.parseInt(priority);                        Thread.currentThread().setPriority(level);                        Debug.msg("Set priority to level " + priority); //$NON-NLS-1$                    } catch (NumberFormatException nfe) {                        System.err                                .println(JFritz.getMessage("parameter_wrong_priority")); //$NON-NLS-1$                        System.exit(0);                    } catch (IllegalArgumentException iae) {                        System.err                                .println(JFritz.getMessage("parameter_wrong_priority")); //$NON-NLS-1$                        System.exit(0);                    }                    break;                }            default:                break;            }        }        new JFritz(fetchCalls, csvExport, csvFileName, clearList, enableInstanceControl, foreign);    }