import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.DirectoryStream;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;

import sun.misc.Unsafe;

public class Test {
  private static void patch(Path bootImagePath, Path extImagePath, Path appImagePath) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException {
    Class<?> systemImagesClass = Class.forName("jdk.internal.jrtfs.SystemImages");
    Field bootImagePathField = systemImagesClass.getDeclaredField("bootImagePath");
    Field extImagePathField = systemImagesClass.getDeclaredField("extImagePath");
    Field appImagePathField = systemImagesClass.getDeclaredField("appImagePath");
    
    Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
    theUnsafe.setAccessible(true);
    Unsafe unsafe = (Unsafe)theUnsafe.get(null);
    
    unsafe.putObjectVolatile(unsafe.staticFieldBase(bootImagePathField), unsafe.staticFieldOffset(bootImagePathField), bootImagePath);
    unsafe.putObjectVolatile(unsafe.staticFieldBase(extImagePathField), unsafe.staticFieldOffset(extImagePathField), extImagePath);
    unsafe.putObjectVolatile(unsafe.staticFieldBase(appImagePathField), unsafe.staticFieldOffset(appImagePathField), appImagePath);
  }
  
  public static void main(String[] args) throws URISyntaxException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, IOException {
    //System.out.println(FileSystemProvider.installedProviders());
    
    String RUNTIME_HOME = "/usr/jdk/jdk1.9.0-jigsaw";
    
    // we need to patch the home at runtime
    FileSystem defaultFs = FileSystems.getDefault();
    Path bootImagePath = defaultFs.getPath(RUNTIME_HOME, "lib", "modules", "bootmodules.jimage");
    Path extImagePath = defaultFs.getPath(RUNTIME_HOME, "lib", "modules", "extmodules.jimage");
    Path appImagePath = defaultFs.getPath(RUNTIME_HOME, "lib", "modules", "appmodules.jimage");
    patch(bootImagePath, extImagePath, appImagePath);
    
    FileSystem jrtFs = FileSystems.getFileSystem(new URI("jrt:/"));
    for(Path root: jrtFs.getRootDirectories()) {
      System.out.println(root);
      try(DirectoryStream<Path> directoryStream = Files.newDirectoryStream(root)) {
        for(Path path: directoryStream) {
          System.out.println(path);
        }
      }
    }
  }
}

@@ -244,36 +244,160 @@
 File
-s;%0Aimport java.nio.file.Path
+VisitResult;%0Aimport java.nio.file.FileVisitor;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.attribute.BasicFileAttributes
 ;%0A%0Ai
@@ -2379,16 +2379,841 @@
 (root);%0A
+      %0A      Files.walkFileTree(root, new FileVisitor%3CPath%3E() %7B%0A        @Override%0A        public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException %7B%0A          return FileVisitResult.CONTINUE;%0A        %7D%0A%0A        @Override%0A        public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException %7B%0A          System.out.println(%22found %22 + file);%0A          return FileVisitResult.CONTINUE;%0A        %7D%0A%0A        @Override%0A        public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException %7B%0A          return FileVisitResult.CONTINUE;%0A        %7D%0A%0A        @Override%0A        public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException %7B%0A          return FileVisitResult.CONTINUE;%0A        %7D%0A      %7D);%0A      %0A      /*%0A
       tr
@@ -3379,24 +3379,26 @@
    %7D%0A      %7D
+*/
 %0A    %7D%0A  %7D%0A%7D

Change the example to get the content of the modules