static Class hotwire_overBot(String progID) ctex { S compilerBot = "Compiler Bot with caching!"; startBot(compilerBot, "#1002203"); S ss = "please compile this javax snippet: *"; print("Sending to compiler bot: " + ss); S s = sendToLocalBot_cached(compilerBot, ss, progID); new Matches m; print(s); assertTrue("Compiler Bot response: " + s, match("ok, *", s, m)); S jarPath = m.unq(0); File jar = new File(jarPath); assertTrue(jar.getAbsolutePath(), jar.isFile()); // collect urls (program + libraries) L urls = litlist(jar.toURI().toURL()); S dehlibs = unnull(loadTextFileFromZip(jar, "libraries")); Matcher matcher = Pattern.compile("\\d+").matcher(dehlibs); while (matcher.find()) { S libID = matcher.group(); urls.add(loadLibrary(libID).toURI().toURL()); } // make class loader URLClassLoader classLoader = new URLClassLoader(urls.toArray(new URL[l(urls)])); // load & return main class Class theClass = classLoader.loadClass("main"); Class j = getJavaX(); S src = loadTextFileFromZip(jar, "main.java"); call(j, "registerSourceCode", theClass, src); synchronized(j) { // hopefully this goes well... call(j, "setVars", theClass, progID); callOpt(j, "addInstance", progID, theClass); } hotwire_copyOver(theClass); return theClass; }