http://luaj.org/luaj/README.html
I'm using Luaj to run Lua code in a Java application. I'm getting some really slow results, so I want to try to compile the code before running it to calculate the actual proccesing time of a Lua script.
The problem is - Luaj does show an example how to compile Lua source to Lua or Java bytecode through the command prompt, but it doesn't show me the lines to compile a Lua script with a Java application.
It only shows how to compile AND run a Lua script:
import org.luaj.vm2.*;
import org.luaj.vm2.lib.jse.*;
String script = "examples/lua/hello.lua";
LuaValue _G = JsePlatform.standardGlobals();
_G.get("dofile").call( LuaValue.valueOf(script) );
I want to find the code that would only compile Lua to Lua or Java bytecode and would output a bytecode file.