Lua is a general-purpose embedded programming language designed to support procedural programming with data-description facilities. Although it is not in the public domain (TeCGraf retains the copyright), Lua is freely available for both academic and commercial purposes at http://www.lua.org/.
Lua is far easier to use and simpler than Java. Also, asking whether Lua is better than Java is a bad comparison; it's like asking whether airplanes are better than motorboats. They're both good at different things.
LuaJ is easy to embed in Java. I did have to change a few lines of their source to get it to work how I expected (it didn't require the IO library automatically).
http://sourceforge.net/projects/luaj/
Try also kahlua and Mochalua.
There is http://www.keplerproject.org/luajava/manual.html, but essentially lua is more suitable for integration with C. There are a bunch of other scripting languages with good java integration around though. Consider groovy, jruby or jython for starters.
Lua is a C library, you can embed it in Java but you'll have to interface the java virtual machine and Lua with some C code.
The LuaJava authors have already done that work - you're better off using that than writing your own.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With