Embedding Lua in Java Projects

Started by
4 comments, last by AndreaTucci 11 years, 10 months ago
Hello!
i'm searching a way to embedd Lua scripts in java code. I've tried to compile and install LuaJava but I've had the same error message both from Mac and Linux. I've changed the config file properly. It only works with Lua 5.1.1 (i have 5.2 version) ? Any suggestions about LuaJava or other libraries? Thank you!
AndreaTux~
Advertisement
Lua 5.2 has some incompatibility with 5.1, such like the global index was gone.
So if LuaJava was developed for 5.1, you have to downgrade your Lua to 5.1.

I didn't have experience with Lua in Java, but if you don't mind to change script language, I've ever used Rhino Javascript engine for Java, it works fine for me.

https://www.kbasm.com -- My personal website

https://github.com/wqking/eventpp  eventpp -- C++ library for event dispatcher and callback list

https://github.com/cpgf/cpgf  cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.

Yes Lua 5.2 has many different things from 5.1 version, but i think there is a library for 5.2 version..Lua is one of the most used scripting language for video game development! Thank you for your answer!
AndreaTux~

Yes Lua 5.2 has many different things from 5.1 version, but i think there is a library for 5.2 version..Lua is one of the most used scripting language for video game development! Thank you for your answer!

Not about your question, but before I used Rhino Javascript, I tried to google for Lua Java binding, but I didn't get good result. That's why I had to use JS instead.
Some Lua Java binding requires JNI, so it's not that easy to cross platform (I need cross platform, but since you are developing video game, you may not need it).

If you find any good cross platform Lua Java binding, don't forget to come to give your experience. :-)

https://www.kbasm.com -- My personal website

https://github.com/wqking/eventpp  eventpp -- C++ library for event dispatcher and callback list

https://github.com/cpgf/cpgf  cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.

Hello, i'm trying to configure jnlua .. But it gives me many problems, anyway this is the link : http://code.google.com/p/jnlua/ maybe you could be interested! I need cross platform too, thanks for your suggestions!
AndreaTux~
Hello, try http://sourceforge.net/projects/luaj/ ! Just import .jar file and go!! :)
AndreaTux~

This topic is closed to new replies.

Advertisement