la soluzione ha funzionato
adesso pero' ho il problema che quando vado a salvare il file sul harddisk, il metodo fout.write mi trasforma il path
c:\\pippo
in c:\pippo
che non va bene
codice:
/**
* Salva il file di properties nella directory di lavoro.
*/
public static void save() {
File f = new File(USER_DIR, "prova.txt");
myProperties = filePropertiesHeader + LINE_SEPARATOR
+ LINE_SEPARATOR + myProperties;
FileWriter fout = null;
try {
fout = new FileWriter(USER_DIR + File.separator
+ "prova.txt");
fout.write(myProperties, 0, myProperties.length());
fout.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Ho deuggato ed ho visto che dentro myProperties il path e' correttamente impostato a
c:\\pippo
mentre il metodo .write scrive
c:\pippo