Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 17687)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 17688)
@@ -529,5 +529,9 @@
         // Use more low-level method to find the installed fonts.
         List<String> fontsAvail = new ArrayList<>();
-        Path fontPath = FileSystems.getDefault().getPath(getSystemEnv("SYSTEMROOT"), "Fonts");
+        String systemRoot = getSystemEnv("SYSTEMROOT");
+        if (systemRoot == null) {
+            return fontsAvail;
+        }
+        Path fontPath = FileSystems.getDefault().getPath(systemRoot, "Fonts");
         try (DirectoryStream<Path> ds = Files.newDirectoryStream(fontPath)) {
             for (Path p : ds) {
Index: /trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java	(revision 17687)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java	(revision 17688)
@@ -5,5 +5,4 @@
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
@@ -13,5 +12,4 @@
 import java.io.File;
 import java.io.IOException;
-import java.nio.file.FileSystems;
 import java.security.KeyStoreException;
 import java.util.Collection;
@@ -172,11 +170,9 @@
     @Test
     void testGetInstalledFonts() {
-        assumeTrue(FileSystems.getDefault() != null); // weird NPE on Jenkins
-        assumeTrue(Utils.getJavaVersion() < 16 || PlatformManager.isPlatformWindows()); // No idea why the test fails with Java 16+ on Linux
         Collection<String> fonts = hook.getInstalledFonts();
         if (PlatformManager.isPlatformWindows()) {
             assertFalse(fonts.isEmpty());
         } else {
-            assertNull(fonts);
+            assumeTrue(fonts.isEmpty());
         }
     }
