Here you can find the source of save()
public static void save()
//package com.java2s; import java.io.FileOutputStream; import java.util.Properties; public class Main { static Properties p = new Properties(); static String cfgPath; public static void save() { try {//from w ww .j av a 2s . c o m FileOutputStream fos = new FileOutputStream(cfgPath); p.setProperty("bbb", "333444"); p.store(fos, ""); fos.flush(); fos.close(); System.out.println("store properties success"); } catch (Exception e) { e.printStackTrace(); } } }