codice:
    public static synchronized void setProperty(String key, String value) throws IOException {
        Properties properties = new Properties();
        properties.load(new FileInputStream(fileProperties));
        properties.setProperty(key, value);
        if (System.getProperty("os.name").contains("window")) {
            properties.store(new FileOutputStream(System.getProperty("user.home") + "\\" + fileProperties), null);
        } else {
            properties.store(new FileOutputStream(System.getProperty("user.home") + "/" + fileProperties), null);
            JOptionPane.showMessageDialog(null, System.getProperty("user.home") + "/" + fileProperties);
        }
    }
sto su un mac quindi mi dovrei far stampare il percorso nell'else.
cmq nn ci arriva proprio al metodo in quanto l'optionpane nn esce.
anche commentando la riga
JOptionPane.showMessageDialog(null, ex.getMessage());
nel catch quando richiamo il metodo.