Include whole VM in the bootstrap code closure
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 11 May 2014 08:05:27 +0200
branchclosure
changeset 15525a840853d1a8
parent 1551 0002739b6d1f
child 1553 18ad02fdd1ef
Include whole VM in the bootstrap code
launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/CompileCP.java
     1.1 --- a/launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/CompileCP.java	Fri May 09 08:37:20 2014 +0200
     1.2 +++ b/launcher/http/src/main/java/org/apidesign/bck2brwsr/launcher/CompileCP.java	Sun May 11 08:05:27 2014 +0200
     1.3 @@ -203,12 +203,19 @@
     1.4      }
     1.5  
     1.6      static void compileVM(StringBuilder sb, final Res r) throws IOException {
     1.7 -        URL u = r.get(InterruptedException.class.getName().replace('.', '/') + ".class", 0);
     1.8 -        JarURLConnection juc = (JarURLConnection)u.openConnection();
     1.9 -        
    1.10          List<String> arr = new ArrayList<>();
    1.11          List<String> classes = new ArrayList<>();
    1.12 -        listJAR(juc.getJarFile(), classes, arr, null, null);
    1.13 +
    1.14 +        {
    1.15 +            URL u = r.get(InterruptedException.class.getName().replace('.', '/') + ".class", 0);
    1.16 +            JarURLConnection juc = (JarURLConnection)u.openConnection();
    1.17 +            listJAR(juc.getJarFile(), classes, arr, null, null);
    1.18 +        }
    1.19 +        {
    1.20 +            URL u = r.get(Bck2Brwsr.class.getName().replace('.', '/') + ".class", 0);
    1.21 +            JarURLConnection juc = (JarURLConnection)u.openConnection();
    1.22 +            listJAR(juc.getJarFile(), classes, arr, null, null);
    1.23 +        }
    1.24  
    1.25          Bck2Brwsr.newCompiler().addRootClasses(classes.toArray(new String[0]))
    1.26              .resources(new Bck2Brwsr.Resources() {