예제 #1
0
  public static void main(String[] main_args) throws LuaException, ClassNotFoundException {
    LuaState L = LuaStateFactory.newLuaState();
    L.openBase();

    L.LdoString(str);

    LuaObject func = L.getLuaObject("imprime");
    Object[] teste = func.call(new Object[] {"TESTANDO"}, 2);
    System.out.println(teste[0]);
    System.out.println(teste[1]);

    System.out.println("PROXY TEST :");
    Printable p = new ObjPrint();
    p.print("TESTE 1");

    LuaObject o = L.getLuaObject("luaPrint");
    p = (Printable) o.createProxy("org.keplerproject.luajava.test.Printable");
    p.print("Teste 2");

    L.close();
  }
예제 #2
0
파일: Page.java 프로젝트: joysong/lui
 @Override
 public void onDestroy() {
   luastate.close();
   root.Ondestroy();
   System.gc();
 }