launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/CompileCP.java
branchclosure
changeset 1614 8eba262bd8cd
parent 1606 4e05b6eabbc5
child 1679 93f4fbc4d1b7
     1.1 --- a/launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/CompileCP.java	Tue May 27 15:22:04 2014 +0200
     1.2 +++ b/launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/CompileCP.java	Tue Jun 03 16:05:21 2014 +0200
     1.3 @@ -65,10 +65,17 @@
     1.4          } catch (URISyntaxException ex) {
     1.5              throw new IOException(ex);
     1.6          }
     1.7 -        for (String s : System.getProperty("java.class.path").split(File.pathSeparator)) {
     1.8 -            if (!f.getPath().startsWith(s)) {
     1.9 -                continue;
    1.10 +        String s = f.isDirectory() ? f.getPath() : null;
    1.11 +        
    1.12 +        for (String candidate : System.getProperty("java.class.path").split(File.pathSeparator)) {
    1.13 +            if (s != null) {
    1.14 +                break;
    1.15              }
    1.16 +            if (f.getPath().startsWith(candidate)) {
    1.17 +                s = candidate;
    1.18 +            }
    1.19 +        }
    1.20 +        if (s != null) {
    1.21              File root = new File(s);
    1.22              List<String> arr = new ArrayList<>();
    1.23              List<String> classes = new ArrayList<>();