Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 10875)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 10876)
@@ -168,5 +168,5 @@
      * Global application preferences
      */
-    public static Preferences pref;
+    public static final Preferences pref = new Preferences();
 
     /**
@@ -513,12 +513,4 @@
      */
     public static volatile PlatformHook platform;
-
-    /**
-     * Initializes {@code Main.pref} in normal application context.
-     * @since 6471
-     */
-    public static void initApplicationPreferences() {
-        Main.pref = new Preferences();
-    }
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 10875)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 10876)
@@ -779,4 +779,23 @@
     }
 
+    /**
+     * Resets the preferences to their initial state. This resets all values and file associations.
+     * The default values and listeners are not removed.
+     * <p>
+     * It is meant to be called before {@link #init(boolean)}
+     * @since 10876
+     */
+    public void resetToInitialState() {
+        resetToDefault();
+        preferencesDir = null;
+        cacheDir = null;
+        userdataDir = null;
+        saveOnPut = true;
+        initSuccessful = false;
+    }
+
+    /**
+     * Reset all values stored in this map to the default values. This clears the preferences.
+     */
     public final void resetToDefault() {
         settingsMap.clear();
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10875)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10876)
@@ -326,6 +326,4 @@
         }
 
-        initApplicationPreferences();
-
         Policy.setPolicy(new Policy() {
             // Permissions for plug-ins loaded when josm is started via webstart
