package org.javacs;

import java.io.File;
import java.lang.System;
import java.util.Optional;
import java.nio.file.*;

class Lib {
    static Optional<Path> srcZipPath() {
        return Optional.ofNullable(System.getenv("JAVA_HOME"))
            .flatMap(home -> Optional.of(Paths.get(home).resolve("lib/src.zip")))
            .flatMap(path -> {
                if (path.toFile().exists()) {
                    return Optional.of(path);
                } else {
                    return Optional.empty();
                }
            });
    }

    static final Optional<Path> SRC_ZIP = srcZipPath();
}

@@ -87,16 +87,41 @@
 tional;%0A
+import java.util.Arrays;%0A
 import j
@@ -136,16 +136,16 @@
 file.*;%0A
-
 %0Aclass L
@@ -266,21 +266,17 @@
        .
-flatM
+m
 ap(home 
@@ -282,59 +282,208 @@
  -%3E 
-Optional.of(Paths.get(home).resolve(%22lib/src.zip%22))
+%7B%0A                return Arrays.asList(new Path%5B%5D%7B%0A                    Paths.get(home).resolve(%22lib/src.zip%22),%0A                    Paths.get(home).resolve(%22src.zip%22),%0A                %7D);%0A            %7D
 )%0A  
@@ -505,22 +505,69 @@
 Map(path
+s
  -%3E %7B%0A
+                for (Path path : paths) %7B%0A    
         
@@ -600,24 +600,28 @@
 exists()) %7B%0A
+    
             
@@ -674,21 +674,32 @@
     
-%7D else %7B%0A    
+    %7D%0A                %7D%0A
     
@@ -735,34 +735,16 @@
 mpty();%0A
-                %7D%0A
         

Support other locations for finding src.zip