package peergos.server.net;

import java.io.*;
import java.nio.file.Path;

public class JarHandler extends StaticHandler {
    private final Path root;

    public JarHandler(boolean isGzip, Path root) {
        super(isGzip);
        this.root = root;
    }

    @Override
    public Asset getAsset(String resourcePath) throws IOException {
        String pathWithinJar = root.resolve(resourcePath).toString();
        ClassLoader context = Thread.currentThread().getContextClassLoader();
        byte[] data = StaticHandler.readResource(context.getResourceAsStream(pathWithinJar), isGzip());
        return new Asset(data);
    }
}

@@ -365,16 +365,22 @@
 hinJar =
+ %22/%22 +
  root.re
@@ -409,17 +409,16 @@
 String()
-;
 %0A       
@@ -422,77 +422,64 @@
     
-ClassLoader context = Thread.currentThread().getContextClassLoader();
+        .replaceAll(%22%5C%5C%5C%5C%22, %22/%22); // needed for Windows!
 %0A   
@@ -528,15 +528,24 @@
 rce(
-context
+JarHandler.class
 .get

Fix jar static file handler on Windows