Index: /trunk/src/org/openstreetmap/josm/io/session/GenericSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/GenericSessionExporter.java	(revision 14740)
+++ /trunk/src/org/openstreetmap/josm/io/session/GenericSessionExporter.java	(revision 14741)
@@ -13,4 +13,5 @@
 import java.io.IOException;
 import java.io.OutputStream;
+import java.net.MalformedURLException;
 
 import javax.swing.AbstractAction;
@@ -191,8 +192,11 @@
             addDataFile(support.getOutputStreamZip(zipPath));
         } else {
-            File f = layer.getAssociatedFile();
-            if (f != null) {
-                final String fileString = support.relativize(f.toPath());
-                file.appendChild(support.createTextNode(fileString));
+            try {
+                File f = layer.getAssociatedFile();
+                if (f != null) {
+                    file.appendChild(support.createTextNode(f.toURI().toURL().toString()));
+                }
+            } catch (MalformedURLException e) {
+                throw new IOException(e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java	(revision 14740)
+++ /trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java	(revision 14741)
@@ -69,6 +69,6 @@
                 break;
             }
-            final String fileString = support.relativize(entry.getFile().toPath());
-            addAttr("file", fileString, imgElem, support);
+            addAttr("file", entry.getFile().getPath(), imgElem, support);
+            // FIXME: relative filenames as option
             // FIXME: include images as option (?)
 
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 14740)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 14741)
@@ -13,11 +13,10 @@
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
@@ -25,5 +24,7 @@
 import java.util.Map.Entry;
 import java.util.TreeMap;
-import java.util.stream.Stream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
 
 import javax.swing.JOptionPane;
@@ -150,7 +151,7 @@
     private static final Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<>();
 
-    private Path sessionFile;
+    private URI sessionFileURI;
     private boolean zip; // true, if session file is a .joz file; false if it is a .jos file
-    private FileSystem zipFile;
+    private ZipFile zipFile;
     private List<Layer> layers = new ArrayList<>();
     private int active = -1;
@@ -307,5 +308,8 @@
                 }
             } else if (inZipPath != null) {
-                return Files.newInputStream(zipFile.getPath(inZipPath));
+                ZipEntry entry = zipFile.getEntry(inZipPath);
+                if (entry != null) {
+                    return zipFile.getInputStream(entry);
+                }
             }
             throw new IOException(tr("Unable to locate file  ''{0}''.", uriStr));
@@ -341,5 +345,5 @@
                                 // relative to session file - "../" step out of the archive
                                 String relPath = uri.getPath().substring(3);
-                                return sessionFile.resolveSibling(relPath).toFile();
+                                return new File(sessionFileURI.resolve(relPath));
                             } else {
                                 // file inside zip archive
@@ -348,5 +352,5 @@
                             }
                         } else
-                            return sessionFile.resolveSibling(uriStr).toFile();
+                            return new File(sessionFileURI.resolve(uri));
                     }
                 } else
@@ -700,5 +704,5 @@
     public void loadSession(File sessionFile, boolean zip, ProgressMonitor progressMonitor) throws IllegalDataException, IOException {
         try (InputStream josIS = createInputStream(sessionFile, zip)) {
-            loadSession(josIS, sessionFile.toPath(), zip, progressMonitor != null ? progressMonitor : NullProgressMonitor.INSTANCE);
+            loadSession(josIS, sessionFile.toURI(), zip, progressMonitor != null ? progressMonitor : NullProgressMonitor.INSTANCE);
         }
     }
@@ -707,15 +711,8 @@
         if (zip) {
             try {
-                // read zip using ZipFileSystem/ZipFileSystemProvider
-                zipFile = FileSystems.newFileSystem(new URI("jar:" + sessionFile.toURI()), Collections.emptyMap());
-                try (Stream<Path> content = Files.list(zipFile.getPath("/"))) {
-                    final Path jos = content
-                            .filter(path -> Utils.hasExtension(path.getFileName().toString(), "jos"))
-                            .findFirst()
-                            .orElseThrow(() -> new IllegalDataException(tr("expected .jos file inside .joz archive")));
-                    return Files.newInputStream(jos);
-                }
-            } catch (URISyntaxException e) {
-                throw new IOException(e);
+                zipFile = new ZipFile(sessionFile, StandardCharsets.UTF_8);
+                return getZipInputStream(zipFile);
+            } catch (ZipException ex) {
+                throw new IOException(ex);
             }
         } else {
@@ -724,8 +721,24 @@
     }
 
-    private void loadSession(InputStream josIS, Path sessionFile, boolean zip, ProgressMonitor progressMonitor)
+    private static InputStream getZipInputStream(ZipFile zipFile) throws IOException, IllegalDataException {
+        ZipEntry josEntry = null;
+        Enumeration<? extends ZipEntry> entries = zipFile.entries();
+        while (entries.hasMoreElements()) {
+            ZipEntry entry = entries.nextElement();
+            if (Utils.hasExtension(entry.getName(), "jos")) {
+                josEntry = entry;
+                break;
+            }
+        }
+        if (josEntry == null) {
+            error(tr("expected .jos file inside .joz archive"));
+        }
+        return zipFile.getInputStream(josEntry);
+    }
+
+    private void loadSession(InputStream josIS, URI sessionFileURI, boolean zip, ProgressMonitor progressMonitor)
             throws IOException, IllegalDataException {
 
-        this.sessionFile = sessionFile;
+        this.sessionFileURI = sessionFileURI;
         this.zip = zip;
 
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 14740)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 14741)
@@ -9,5 +9,4 @@
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -16,5 +15,4 @@
 import java.util.Map;
 import java.util.Set;
-import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
@@ -46,5 +44,4 @@
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.MultiMap;
-import org.openstreetmap.josm.tools.StreamUtils;
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.XmlUtils;
@@ -67,5 +64,4 @@
     private final boolean zip;
 
-    private Path output;
     private ZipOutputStream zipOut;
 
@@ -199,30 +195,4 @@
         public boolean isZip() {
             return zip;
-        }
-
-        /**
-         * Returns the path of the output file.
-         *
-         * @return the path of the output file
-         */
-        public Path getOutput() {
-            return output;
-        }
-
-        /**
-         * Returns a relative path w.r.t. the {@linkplain #getOutput output} directory
-         * @param path the path to relativize
-         * @return the relative path
-         * @see Path#relativize(Path)
-         */
-        String relativize(Path path) {
-            final Path output = getOutput();
-            if (output != null && path.startsWith(output.getParent())) {
-                path = output.getParent().relativize(path);
-            }
-            // path.toString() returns backslashes on Windows, see #17228
-            return (isZip() ? "../" : "") + StreamUtils.toStream(path)
-                    .map(Object::toString)
-                    .collect(Collectors.joining("/"));
         }
     }
@@ -359,6 +329,5 @@
      */
     public void write(File f) throws IOException {
-        output = f.toPath();
-        try (OutputStream out = Files.newOutputStream(output)) {
+        try (OutputStream out = Files.newOutputStream(f.toPath())) {
             write(out);
         }
