Index: src/org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 4105)
+++ src/org/openstreetmap/josm/data/imagery/WmsCache.java	(working copy)
@@ -96,7 +96,12 @@
     private Set<ProjectionBounds> areaToCache;
 
     public WmsCache(String url, int tileSize) {
-        File globalCacheDir = new File(Main.pref.getPreferencesDir() + PROP_CACHE_PATH.get());
+        String cacheDirPath = PROP_CACHE_PATH.get();
+        if (!(cacheDirPath.startsWith("/") || cacheDirPath.startsWith(":/",1))) {
+            //Not an absolute path
+            cacheDirPath = Main.pref.getPreferencesDir() + cacheDirPath;
+        }
+        File globalCacheDir = new File(cacheDirPath);
         globalCacheDir.mkdirs();
         cacheDir = new File(globalCacheDir, getCacheDirectory(url));
         cacheDir.mkdirs();
