import java.io.IOException; 
import java.net.URI; 
import java.net.URISyntaxException; 
import java.nio.file.FileSystem; 
import java.nio.file.FileSystems; 
import java.nio.file.Path; 
import java.nio.file.Paths; 
import java.util.Collections; 

public class JI_9046949{ 

    static void produceZip (Path directoryPath) throws URISyntaxException, IOException { 
        Path zipPath = Paths.get("c:", "dev", "test space", "zipped.zip"); 
        URI uri = new URI("jar", zipPath.toUri().toString(), null); 
        try (FileSystem zipfs = FileSystems.newFileSystem(uri, 
                Collections.singletonMap("create", "true"))) { 
        } 
    } 

    public static void main(String[] args) { 
        try { 
            produceZip(Paths.get("src")); 
        } catch (Throwable t) { 
            System.out.println("Blad: " + t.getMessage()); 
            t.printStackTrace(); 
        } 
    } 
} 