Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 14143)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 14144)
@@ -281,18 +281,5 @@
         addPossibleResourceDir(locations, getSystemEnv("JOSM_RESOURCES"));
         addPossibleResourceDir(locations, getSystemProperty("josm.resources"));
-        if (PlatformManager.isPlatformWindows()) {
-            String appdata = getSystemEnv("APPDATA");
-            if (appdata != null && getSystemEnv("ALLUSERSPROFILE") != null
-                    && appdata.lastIndexOf(File.separator) != -1) {
-                appdata = appdata.substring(appdata.lastIndexOf(File.separator));
-                locations.add(new File(new File(getSystemEnv("ALLUSERSPROFILE"),
-                        appdata), "JOSM").getPath());
-            }
-        } else {
-            locations.add("/usr/local/share/josm/");
-            locations.add("/usr/local/lib/josm/");
-            locations.add("/usr/share/josm/");
-            locations.add("/usr/lib/josm/");
-        }
+        locations.addAll(PlatformManager.getPlatform().getPossiblePreferenceDirs());
         return locations;
     }
Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 14143)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 14144)
@@ -18,5 +18,4 @@
 import java.util.stream.Collectors;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.command.ChangeCommand;
@@ -1046,5 +1045,5 @@
      *
      * @param nodes the list of nodes representing the polygon
-     * @param projection the projection to use for the calculation, {@code null} defaults to {@link Main#getProjection()}
+     * @param projection the projection to use for the calculation, {@code null} defaults to {@link ProjectionRegistry#getProjection()}
      * @return area and perimeter
      * @since 13638 (signature)
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHook.java	(revision 14143)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHook.java	(revision 14144)
@@ -16,4 +16,6 @@
 import java.security.cert.X509Certificate;
 import java.text.DateFormat;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
@@ -369,3 +371,12 @@
         return file;
     }
+
+    /**
+     * Returns a set of possible platform specific directories where resources could be stored.
+     * @return A set of possible platform specific directories where resources could be stored.
+     * @since 14144
+     */
+    default Collection<String> getPossiblePreferenceDirs() {
+        return Collections.emptyList();
+    }
 }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 14143)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 14144)
@@ -24,5 +24,8 @@
 import java.security.cert.X509Certificate;
 import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
 import java.util.Locale;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 
@@ -419,3 +422,13 @@
         return null;
     }
+
+    @Override
+    public Collection<String> getPossiblePreferenceDirs() {
+        Set<String> locations = new HashSet<>();
+        locations.add("/usr/local/share/josm/");
+        locations.add("/usr/local/lib/josm/");
+        locations.add("/usr/share/josm/");
+        locations.add("/usr/lib/josm/");
+        return locations;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 14143)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 14144)
@@ -65,7 +65,9 @@
 import java.util.Collection;
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Properties;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
@@ -781,3 +783,15 @@
         return file;
     }
+
+    @Override
+    public Collection<String> getPossiblePreferenceDirs() {
+        Set<String> locations = new HashSet<>();
+        String appdata = getSystemEnv("APPDATA");
+        if (appdata != null && getSystemEnv("ALLUSERSPROFILE") != null
+                && appdata.lastIndexOf(File.separator) != -1) {
+            appdata = appdata.substring(appdata.lastIndexOf(File.separator));
+            locations.add(new File(new File(getSystemEnv("ALLUSERSPROFILE"), appdata), "JOSM").getPath());
+        }
+        return locations;
+    }
 }
