private final void loadRSAKeys() {
        try {
            File pubFile, privFile;
            String name = GroupServer.getHostName();
            System.out.println("*** DEBUG: hostname: "+name);
            URL url1, url2;

            // try to find the resource file:
            url1 = SecurityManager.class.getResource("/tinboa/server/" + name + "_publicKey.ser");
            url2 = SecurityManager.class.getResource("/tinboa/server/" + name + "_privateKey.ser");
            if(url1 == null || url2 == null) {
                url1 = SecurityManager.class.getResource("/tinboa/server/");
                pubFile = new File(url1.getPath() + name + "_publicKey.ser");
                privFile = new File(url1.getPath() + name + "_privateKey.ser");
                makeRSAKeys(pubFile, privFile); //create or overwrite a file
            } else {
                // load the public Key
                pubFile = new File(url1.getFile());
                FileInputStream fis = new FileInputStream(pubFile);
                ObjectInputStream ois = new ObjectInputStream(fis);
                PublicKey publicKey = (JCERSAPublicKey)ois.readObject();
                ois.close();

                // load the private Key
                pubFile = new File(url2.getFile());
                fis = new FileInputStream(pubFile);
                ois = new ObjectInputStream(fis);
                PrivateKey privateKey = (JCERSAPrivateKey)ois.readObject();
                ois.close();

                RSAKeyPair = new KeyPair(publicKey, privateKey);

            }
        } catch (Exception e) {
            //System.err.println(e);
            e.printStackTrace();
        }
    }