} catch (UnsatisfiedLinkError ule) { Debug.err(ule.toString()); SYSTRAY_SUPPORT = false;
    public JFritz(boolean fetchCalls, boolean csvExport, String csvFileName,            boolean clearList) {        jfritz = this;        loadMessages(new Locale("de", "DE"));        loadProperties();        //check isRunning and exit or set lock        isRunning=(properties.getProperty("jfritz.isRunning","false").equals("true")?true:false);        if (!isRunning)        {        	Debug.msg("Multiple instance lock: set lock.");        	properties.setProperty("jfritz.isRunning","true");        }        else        {        	Debug.msg("Multiple instance lock: Another instance is already running.");        	//JOptionPane.showMessageDialog(null,JFritz.PROGRAM_NAME+" kann nicht mehrfach gestartet werden.","Information",JOptionPane.OK_OPTION+JOptionPane.INFORMATION_MESSAGE);        	int answer=JOptionPane.showConfirmDialog(null,        			JFritz.PROGRAM_NAME+" sollte nicht mehrfach gestartet werden!"        			+"\n\nHinweis:"        			+"\nSollten Sie diese Meldung sehen, obwohl Sie "+JFritz.PROGRAM_NAME+" nur einmal"        			+"\ngestartet haben, so liegt dies vermutlich daran, dass eine vorige "        			+"\n"+JFritz.PROGRAM_NAME+"-Intstanz unplanmig beendet wurde (z.B. durch einen "        			+"\nSystemabsturz). "        			+"\nIn diesem Fall knnen Sie JFritz mit diesem Dialog starten."        			+"\n\nBitte beachten Sie jedoch, dass "+JFritz.PROGRAM_NAME+" NICHT MEHRFACH gestartet "+""        			+"\nwerden sollte, da es sonst zu DATENVERLUST kommen kann."			        			+"\n\nSoll diese Instanz von "+JFritz.PROGRAM_NAME+" beendet werden?","Information",JOptionPane.YES_NO_OPTION);        	if (answer==JOptionPane.YES_OPTION)        	{            	Debug.msg("Multiple instance lock: User decided to shut down this instance.");         		System.exit(0);        	}        	else        	{        		Debug.msg("Multiple instance lock: User decided NOT to shut down this instance.");        	}        }        //saveProperties cannot used here because jframe (and its dimensions) is not yet initilized.          try {            Debug.msg("Save other properties");            properties.storeToXML(JFritz.PROPERTIES_FILE);        } catch (IOException e) {            Debug.err("Couldn't save Properties");        }                loadSounds();        String osName = System.getProperty("os.name");        Debug.msg("Betriebssystem: " + osName);        if (osName.startsWith("Mac OS"))            HostOS = "Mac";        else if (osName.startsWith("Windows"))            HostOS = "Windows";        else if (osName.equals("Linux")) {            HostOS = "Linux";        }        Debug.msg("JFritz runs on " + HostOS);        if (HostOS.equalsIgnoreCase("mac")) {            new MacHandler(this);        }        autodetectFirmware();        phonebook = new PhoneBook(this);        phonebook.loadFromXMLFile(PHONEBOOK_FILE);        sipprovider = new SipProviderTableModel();        sipprovider.loadFromXMLFile(SIPPROVIDER_FILE);        callerlist = new CallerList(this);        callerlist.loadFromXMLFile(CALLS_FILE);        Debug.msg("Start des commandline parsing");        if (fetchCalls) {            Debug.msg("Anrufliste wird von Fritz!Box geholt..");            try {                callerlist.getNewCalls();            } catch (WrongPasswordException e) {                Debug.err(e.toString());            } catch (IOException e) {                Debug.err(e.toString());            } finally {                if (csvExport) {                    Debug.msg("CSV-Export to " + csvFileName);                    callerlist.saveToCSVFile(csvFileName, true);                }                if (clearList) {                    Debug.msg("Clearing Caller List");                    callerlist.clearList();                }                Debug.msg("JFritz beendet sich nun.");                System.exit(0);            }        }        if (csvExport) {            Debug.msg("CSV-Export to " + csvFileName);            callerlist.saveToCSVFile(csvFileName, true);            if (clearList) {                Debug.msg("Clearing Caller List");                callerlist.clearList();            }            System.exit(0);        }        if (clearList) {            Debug.msg("Clearing Caller List");            callerlist.clearList();            System.exit(0);        }        Debug.msg("Neue Instanz von JFrame");        jframe = new JFritzWindow(this);        Debug.msg("Checke Systray-Support");        if (checkForSystraySupport()) {            try {                systray = SystemTray.getDefaultSystemTray();                createTrayMenu();                        } catch (Exception e) {                Debug.err(e.toString());                SYSTRAY_SUPPORT = false;            }        }        if (JFritzUtils.parseBoolean(JFritz.getProperty("option.useSSDP",                "true"))) {            Debug.msg("Suche FritzBox ber UPnP / SSDP");            ssdpthread = new SSDPdiscoverThread(this, SSDP_TIMEOUT);            ssdpthread.start();            try {                ssdpthread.join();            } catch (InterruptedException ie) {            }        }        jframe.checkStartOptions();        javax.swing.SwingUtilities.invokeLater(jframe);        startWatchdog();    }