Here you can find the source of getFileSystem(Path file)
public static FileSystem getFileSystem(Path file) throws IOException
//package com.java2s; //License from project: Open Source License import java.nio.file.Path; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.io.IOException; import java.util.HashMap; import java.net.URI; public class Main { public static FileSystem getFileSystem(Path file) throws IOException { FileSystem fs = null;//ww w. j a va 2s . co m try { URI fileUri = file.toUri(); URI uri = new URI("jar:" + fileUri.getScheme(), fileUri.getPath(), null); fs = FileSystems.newFileSystem(uri, new HashMap<String, String>()); } catch (Exception e) { e.printStackTrace(); } return fs; } }