• Advertisement
Sign in to follow this  

Embedding Lua in Java Projects

This topic is 2062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

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. :-)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement