private final GroupServerRecord loadServerKey() {
        GroupServerRecord g = null;
        try {

            // try to load server info from resource file:
            File f;
            URL url;

            url = SecurityManager.class.getResource("/tinboa/client/.keystore");
            // if the resournce doesn't exist:
            if (url == null) {
                url = SecurityManager.class.getResource("/tinboa/client/");
                f = new File(url.getPath() + ".keystore");
                f.createNewFile();
            } else {
                f = new File(url.getFile());
                FileInputStream fis = new FileInputStream(f);
                if (fis.available() > 0) {
                    ObjectInputStream ois = new ObjectInputStream(fis);
                    g = (GroupServerRecord) ois.readObject();
                    ois.close();
                }
                fis.close();
            }
        } catch (Exception e) {
            System.err.println(e);
            e.printStackTrace();
        }
        return g;
    }