static O hotwire_onCompile; // voidfunc(Pair) sbool hotwire_serially; static Lock hotwire_overInternalBot_lock = lock(); static Class hotwire_overInternalBot(S progID) { ret hotwire_overInternalBot(progID, "main"); } static Class hotwire_overInternalBot(S progID, S mainClass) ctex { Pair p = CompilerBot.compileSnippet2(progID); lock hotwire_serially ? hotwire_overInternalBot_lock : null; callF(hotwire_onCompile, p); File jar = p.a; assertTrue(jar.getAbsolutePath(), jar.isFile()); // collect files (program + libraries) L files = ll(jar); S dehlibs; try { dehlibs = unnull(loadTextFileFromZip(jar, "libraries")); } catch e { jar.delete(); throw rethrow(e); } Matcher matcher = Pattern.compile("\\d+").matcher(dehlibs); while (matcher.find()) { S libID = matcher.group(); files.add(loadLibrary(libID)); } // make class loader JavaXClassLoader classLoader = hotwire_makeClassLoader(files); classLoader.progID = progID; ret hotwire_finish(classLoader, progID, p.b, mainClass); }