!1001362 // named threads static new L injectable_programsInjected; static boolean injectable_on; static class PaA { S progID; S[] arguments; *(S *progID, S[] *arguments) {} *() {} } static synchronized void injectable() { if (injectable_on) return; injectable_on = true; Android3 android = new Android3("Injectable. PID: " + getPID() + "."); android.responder = new Responder() { S answer(S s, L history) { new Matches m; if (match3("please inject program *", s, m) || match3("please inject program * with arguments *", s, m)) { final S progID = formatSnippetID(unquote(m.m[0])); final S[] arguments = m.m.length > 1 ? toStringArray((List) unstructure(unquote(m.m[1]))) : new S[0]; injectable_programsInjected.add(new PaA(progID, arguments)); // better call JavaX for translation in a single thread. final Class theClass = hotwire(progID); // program may run in its own thread. thread progID { callMain(theClass, arguments); } ret "OK."; } ret null; } }; makeAndroid3(android); print("VM " + getPID() + " made injectable."); }