Here you can find the source of saveDefaultScriptDirectory(String path)
public static void saveDefaultScriptDirectory(String path)
//package com.java2s; //License from project: Open Source License import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Properties; public class Main { private static final String DEFAULT_SCRIPT_DIR = "default_script_directory"; private static String filePath; private static Properties config; public static void saveDefaultScriptDirectory(String path) { config.setProperty(DEFAULT_SCRIPT_DIR, path); store();//w ww .ja v a 2 s . c o m } private static void store() { OutputStream stream = null; try { stream = new FileOutputStream(filePath); config.store(stream, null); } catch (IOException e) { e.printStackTrace(); } finally { if (stream != null) { try { stream.close(); } catch (IOException e) { e.printStackTrace(); } } } } }