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下