title: JIMFS not recognized by ZipFileSystemProvider
body: <p>I have a zip file created in <a href="https://github.com/google/jimfs" rel="nofollow">jimfs </a> (google in memory file system) from a byte array. When trying to open that file with <code>ZipMemoryFileSystem</code>, I get an error that the  provider is not recognized. 
  My code is as following:</p>
  
  <pre><code>public static void test(byte[] document) {
      try {
           try (FileSystem memoryFileSystem = Jimfs.newFileSystem(Configuration.unix())) {
              Files.write(memoryFileSystem.getPath("/file.zip"), document);
              URI uri = URI.create("jar:" + memoryFileSystem.getPath("/file.zip").toUri());
              Map&lt;String, String&gt; env = Collections.singletonMap("create", "false");
              try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {
                  //do something                  
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      } catch (IOException e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>The URI is something like: <code>jar:jimfs://bb2c779f-d327-4e2f-9841-bd04785f1365/file.zip</code>.</p>
  
  <p>The stack trace is:</p>
  
  <pre><code>java.nio.file.FileSystemNotFoundException: Provider "jimfs" not installed
      at java.nio.file.Paths.get(Paths.java:158)
      at com.sun.nio.zipfs.ZipFileSystemProvider.uriToPath(ZipFileSystemProvider.java:97)
      at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:119)
      at java.nio.file.FileSystems.newFileSystem(FileSystems.java:337)
      at java.nio.file.FileSystems.newFileSystem(FileSystems.java:287)
      at office.ImfsTest.test(ImfsTest.java:88)
      at office.ImfsTest.main(ImfsTest.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      at java.lang.reflect.Method.invoke(Method.java:508)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
      at java.lang.Thread.run(Thread.java:785)
  </code></pre>
  
  <p>The jimfs is not listed with <code>FileSystemProvider.installedProviders()</code>. It is in a separate class loader than <code>ZipFileSystemProvider</code>, respectively <code>Thread.currentThread().getContextClassLoader()</code> vs.  <code>ClassLoader.getSystemClassLoader().getParent()</code> for <code>FileSystemZipProvider</code>. </p>
  
  <p>Providers prints are as following:</p>
  
  <pre><code>IM Provider:com.google.common.jimfs.JimfsFileSystemProvider@ed301b1f IM Scheme:jimfs IM Class Loader:java.net.URLClassLoader@4940e7a2
  Installed Provider:sun.nio.fs.LinuxFileSystemProvider@d83a6d85 Scheme:file Class Loader:null
  Installed Provider:com.sun.nio.zipfs.ZipFileSystemProvider@110a4ec7 Scheme:jar Class Loader:sun.misc.Launcher$ExtClassLoader@59a155ab
  </code></pre>
  
  <p>I have tried to set the class loaders manually based on jimfs <a href="http://www.programcreek.com/java-api-examples/index.php?source_dir=jimfs-master/jimfs/src/test/java/com/google/common/jimfs/ClassLoaderTest.java" rel="nofollow">ClassLoaderTest</a> example with no success.
   I am running on Linux.</p>
  
  <p>Used jimfs 1.1 (also tried 2.0-SNAPSHOT with fix  <a href="https://github.com/google/jimfs/commit/3299e69f75cf524e6d101d88e8c202c1b24bf25a" rel="nofollow">https://github.com/google/jimfs/commit/3299e69f75cf524e6d101d88e8c202c1b24bf25a</a> for issue <a href="https://github.com/google/jimfs/issues/31" rel="nofollow">31</a>).</p>
  
  <p>How could I have my code working?</p>