I am working on a app, It has a GUI (But not Java swing and JFrame stuff) I want to incorporate the Lua shell into the GUI. LuaJava doesn't have good documentation (or atleast for me) on how to do this.
Embedding the Lua shell into a Java Application (LuaJava)
983 Views Asked by Quantum-Sicarius At
2
There are 2 best solutions below
0

I have used both LuaJ and Kahlua to do this. Works great with either one (they are roughly the same codebase) LuaJ has more complete implementations of the Lua standard libraries.
You can see on the right, I added an interactive Lua console to my IDE.
All my source is here: https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home
Actually, all you really need are the sources here:
https://bitbucket.org/sylvanaar2/lua-for-idea/src/770c80f12c11/src/kahlua
Here is an example of exposing an API to Lua, and calling Lua functions from Java.
You'll probably have to write the 'shell' part yourself (in java), then pass the typed input to the embeded interpret (LuaJava, I suppose).
Maye java-readline could help.