Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 6469)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 6471)
@@ -18,4 +18,5 @@
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URL;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -54,4 +55,5 @@
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.data.ServerSidePreferences;
 import org.openstreetmap.josm.data.UndoRedoHandler;
 import org.openstreetmap.josm.data.coor.CoordinateFormat;
@@ -335,4 +337,21 @@
 
     /**
+     * Initializes {@code Main.pref} in applet context.
+     * @param serverURL The server URL hosting the user preferences.
+     * @since 6471
+     */
+    public static void initAppletPreferences(URL serverURL) {
+        Main.pref = new ServerSidePreferences(serverURL);
+    }
+
+    /**
+     * Initializes {@code Main.pref} in normal application context.
+     * @since 6471
+     */
+    public static void initApplicationPreferences() {
+        Main.pref = new Preferences();
+    }
+
+    /**
      * Set or clear (if passed <code>null</code>) the map.
      * @param map The map to set {@link Main#map} to. Can be null.
Index: trunk/src/org/openstreetmap/josm/gui/MainApplet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplet.java	(revision 6469)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplet.java	(revision 6471)
@@ -101,5 +101,5 @@
         Main.platform.preStartupHook();
 
-        Main.pref = new ServerSidePreferences(getCodeBase());
+        Main.initAppletPreferences(getCodeBase());
 
         String lang = getParameter("language");
@@ -166,5 +166,5 @@
         Main.applet = true;
         MainApplet applet = new MainApplet();
-        Main.pref = new ServerSidePreferences(applet.getCodeBase());
+        Main.initAppletPreferences(applet.getCodeBase());
         applet.setStub(new AppletStub() {
             @Override
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6469)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6471)
@@ -273,5 +273,5 @@
         }
 
-        Main.pref = new Preferences();
+        initApplicationPreferences();
 
         Policy.setPolicy(new Policy() {
