So I got this java file which loads a .lua file. Pretty basic and it works if I try to run it in Eclipse.
Now when I compile the project in a runnable jar file it wont load at all. When you double click it, it just loads and stops.
I tried multiple jar compile options but it doesn't seem to work though.
import org.luaj.vm2.LuaValue;
import org.luaj.vm2.lib.jse.JsePlatform;
public class SampleJseMain {
public static void main(String[] args) throws Exception {
String script = "main.lua";
// create an environment to run in
LuaValue _G = JsePlatform.standardGlobals();
_G.get("dofile").call( LuaValue.valueOf(script) );
}
}
And the Lua main file:
delay = 100000
while delay > 1 do
print( 'hello, world' )
delay = delay - 1
end