Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6107)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 6108)
@@ -229,32 +229,4 @@
         I18n.init();
         Main.checkJava6();
-        Main.pref = new Preferences();
-
-        Policy.setPolicy(new Policy() {
-            // Permissions for plug-ins loaded when josm is started via webstart
-            private PermissionCollection pc;
-
-            {
-                pc = new Permissions();
-                pc.add(new AllPermission());
-            }
-
-            @Override
-            public void refresh() { }
-
-            @Override
-            public PermissionCollection getPermissions(CodeSource codesource) {
-                return pc;
-            }
-        });
-
-        Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());
-        // http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/
-        System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());
-
-        // initialize the platform hook, and
-        Main.determinePlatformHook();
-        // call the really early hook before we do anything else
-        Main.platform.preStartupHook();
 
         // construct argument table
@@ -265,20 +237,50 @@
             System.exit(1);
         }
+        
+        final boolean languageGiven = args.containsKey(Option.LANGUAGE);
+
+        if (languageGiven) {
+            I18n.set(args.get(Option.LANGUAGE).iterator().next());
+        }
+
+        Main.pref = new Preferences();
+
+        Policy.setPolicy(new Policy() {
+            // Permissions for plug-ins loaded when josm is started via webstart
+            private PermissionCollection pc;
+
+            {
+                pc = new Permissions();
+                pc.add(new AllPermission());
+            }
+
+            @Override
+            public void refresh() { }
+
+            @Override
+            public PermissionCollection getPermissions(CodeSource codesource) {
+                return pc;
+            }
+        });
+
+        Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());
+        // http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/
+        System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());
+
+        // initialize the platform hook, and
+        Main.determinePlatformHook();
+        // call the really early hook before we do anything else
+        Main.platform.preStartupHook();
 
         Main.commandLineArgs = argArray;
-
+        
         if (args.containsKey(Option.VERSION)) {
             System.out.println(Version.getInstance().getAgentString());
             System.exit(0);
-        } //else {
-        //    System.out.println(Version.getInstance().getReleaseAttributes());
-        //}
+        }
 
         Main.pref.init(args.containsKey(Option.RESET_PREFERENCES));
 
-        // Check if passed as parameter
-        if (args.containsKey(Option.LANGUAGE)) {
-            I18n.set(args.get(Option.LANGUAGE).iterator().next());
-        } else {
+        if (!languageGiven) {
             I18n.set(Main.pref.get("language", null));
         }
