static Class hotwire_overInternalBot(String progID) ctex { File jar = CompilerBot.compileSnippet(progID); 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(); // We don't use this right now // 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; }