User:Kevin Reid/

From Erights

Jump to: navigation, search

// Minimal Java program attempting to set up an E-on-Java vat and do something in it. Written 2008-10-11. Doesn't work as of 2010-11-22 testing; I don't recall whether I ever finished it. Result is problem: <NoSuchMethodException: <an HeadlessRunnerMgr__Maker>.getTHE_ONE/0>

// [ It probably needs a System.setProperty("e.safej.bind-var-to-propName", "true"); ] — User:ThomasLeonard

 import org.erights.e.elang.interp.ScopeSetup;
 import org.erights.e.elib.tables.Twine;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elang.syntax.EParser;
 import org.erights.e.elang.evm.ENode;
 import org.erights.e.elib.serial.Loader;
 import org.erights.e.elib.vat.Vat;
 class ASTPrint {
   public static void main(String[] args) {
     try {
       Vat vat = Vat.make("headless", "start");
       Throwable optNoStart = vat.enqueue(new Runnable() {
         public void run() {
           ENode node ="aardvarks"));
           Loader i = (Loader)(ScopeSetup.safeScope("__main$").get("import__uriGetter"));
           Object converter ="org.erights.e.elang.visitors.makeConvertENode2Term"), "run");
           System.out.print(, "run", node));
       if (null != optNoStart) {
         throw optNoStart;
     } catch (Throwable e) {
       System.err.print(, "eStack"));
Personal tools
more tools