System.out.println(npe);
    public static void main(String args[]) {        try {            Preferences.loadPreferences();        } catch (IOException ioe) {            JOptionPane.showMessageDialog(new javax.swing.JFrame(), new String[] {"Unable to load WebScarab properties!", ioe.toString()}, "Error!", JOptionPane.ERROR_MESSAGE);            System.exit(1);        }        Framework framework = new Framework();                WebScarab ws = new WebScarab(framework);        try {            String position = Preferences.getPreferences().getProperty("WebScarab.position");            int p = Math.max(position.indexOf('-',2),position.indexOf('+',2));            int x = Integer.parseInt(position.substring(position.indexOf('+')+1,p));            int y = Integer.parseInt(position.substring(p+1));            String size = Preferences.getPreferences().getProperty("WebScarab.size");            p = size.indexOf('x');            int width = Integer.parseInt(size.substring(0,p));            int height = Integer.parseInt(size.substring(p+1));            ws.setBounds(x,y,width,height);        } catch (NumberFormatException nfe) {            System.out.println(nfe);        } catch (NullPointerException npe) {            System.out.println(npe);        }                ws.show();                ws.addPlugin(new ProxyPanel(framework));        ws.addPlugin(new SpiderPanel(framework));        ws.addPlugin(new ManualRequestPanel(framework));        ws.addPlugin(new SessionIDPanel(framework));                boolean loaded = false;        if (args != null && args.length == 1 && !args[0].equals("")) {            loaded = ws.loadSession(args[0]);        } else {            JFileChooser jfc = new JFileChooser();            jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);            jfc.setDialogTitle("Select a directory to write the session into");            int returnVal = jfc.showOpenDialog(ws);            if (returnVal == JFileChooser.APPROVE_OPTION) {                File file = jfc.getSelectedFile();                String dir = file.toString() + System.getProperty("file.separator");                if (FileSystemStore.isExistingSession(dir)) {                    loaded = ws.loadSession(dir);                } else {                    loaded = ws.createSession(dir);                }            }        }        if (!loaded) {            JOptionPane.showMessageDialog(null, "Conversations and other data will not be saved unless you create or open a session", "Warning", JOptionPane.WARNING_MESSAGE);        }    }