Index: trunk/src/org/openstreetmap/josm/tools/Tag2Link.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Tag2Link.java	(revision 16833)
+++ trunk/src/org/openstreetmap/josm/tools/Tag2Link.java	(revision 16834)
@@ -23,4 +23,6 @@
 
 import org.openstreetmap.josm.data.osm.OsmUtils;
+import org.openstreetmap.josm.data.preferences.ListProperty;
+import org.openstreetmap.josm.io.CachedFile;
 
 /**
@@ -54,4 +56,7 @@
             .collect(Collectors.joining("|"));
 
+    static final ListProperty PREF_SOURCE = new ListProperty("tag2link.source",
+            Collections.singletonList("resource://META-INF/resources/webjars/tag2link/2020.7.15/index.json"));
+
     private Tag2Link() {
         // private constructor for utility class
@@ -77,5 +82,7 @@
         try {
             wikidataRules.clear();
-            initializeFromResources();
+            for (String source : PREF_SOURCE.get()) {
+                initializeFromResources(new CachedFile(source));
+            }
         } catch (Exception e) {
             Logging.error("Failed to initialize tag2link rules");
@@ -87,10 +94,10 @@
      * Initializes the tag2link rules from the resources.
      *
+     * @param resource the source
      * @throws IOException in case of I/O error
      */
-    private static void initializeFromResources() throws IOException {
-        final String resource = "META-INF/resources/webjars/tag2link/2020.7.15/index.json";
+    private static void initializeFromResources(CachedFile resource) throws IOException {
         final JsonArray rules;
-        try (InputStream inputStream = Tag2Link.class.getClassLoader().getResourceAsStream(resource);
+        try (InputStream inputStream = resource.getInputStream();
              JsonReader jsonReader = Json.createReader(inputStream)) {
             rules = jsonReader.readArray();
Index: trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java	(revision 16833)
+++ trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java	(revision 16834)
@@ -7,5 +7,9 @@
 
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -23,4 +27,11 @@
         Assert.assertEquals(Arrays.asList(expected), links);
     }
+
+    /**
+     * Setup test.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
