Here you can find the source of getUserPreferences()
public static Preferences getUserPreferences()
//package com.java2s; import java.util.prefs.Preferences; public class Main { private static Class<?> mainAppClass; /**//from w w w. j a v a 2 s .c om * Retrieves the preference package based on the specified preferenceClass */ public static Preferences getUserPreferences() { return Preferences.userNodeForPackage(mainAppClass); } }