2009-10-27 06:12:24 +00:00
|
|
|
|
|
|
|
|
|
2010-05-14 04:00:05 +00:00
|
|
|
import org.luaj.vm2.LuaValue;
|
|
|
|
|
import org.luaj.vm2.lib.JsePlatform;
|
2009-10-27 06:12:24 +00:00
|
|
|
|
|
|
|
|
public class SampleJseMain {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
|
String script = "examples/lua/hello.lua";
|
|
|
|
|
|
|
|
|
|
// create an environment to run in
|
|
|
|
|
LuaValue _G = JsePlatform.standardGlobals();
|
|
|
|
|
_G.get("dofile").call( LuaValue.valueOf(script) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|