Java简单调用Lua

 1 package lua;
 2 
 3 import org.keplerproject.luajava.LuaState;
 4 import org.keplerproject.luajava.LuaStateFactory;
 5 
 6 public class LuaDemo {
 7     
 8     public static void main(String[] args) {
 9         LuaState L = LuaStateFactory.newLuaState();
10         L.openLibs();
11         L.LdoFile("lua/demo01.L");
12         L.close();
13     }
14 
15 }

需要将luajava-1.1.dll拷贝到jdk/jre/bin下

posted @ 2017-01-19 15:55  MicroCat  阅读(2285)  评论(0编辑  收藏  举报