Java examples for Native OS:Preference
Importing Preferences
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.prefs.InvalidPreferencesFormatException; import java.util.prefs.Preferences; public class Main { public static void main(String[] args) { // Create an input stream on a file InputStream is = null;/* ww w . java 2s . c o m*/ try { is = new BufferedInputStream(new FileInputStream("output.xml")); Preferences.importPreferences(is); } catch (InvalidPreferencesFormatException e) { } catch (IOException e) { } } }