0
I want to learn how to develop, combining more than one programming language, using java with scripts in moon.
0
I want to learn how to develop, combining more than one programming language, using java with scripts in moon.
1
The Luaj offers a very simple integration interface between Java and Lua.
import org.luaj.vm2.*;
import org.luaj.vm2.lib.jse.*;
Globals globals = JsePlatform.standardGlobals();
LuaValue chunk = globals.loadfile("examples/lua/hello.lua"); // seu script lua
chunk.call();
You can save the value returned from chunk.call()
in a variable. This is the result of the script executed. Source
The Luaj is fully open source and is on Github.
Browser other questions tagged java lua
You are not signed in. Login or sign up in order to post.