Jump to content

  • Log In with Google      Sign In   
  • Create Account


Embedding Lua in Java Projects


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 AndreaTux   Members   -  Reputation: 182

Like
0Likes
Like

Posted 22 May 2012 - 08:54 AM

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~

Sponsor:

#2 wqking   Members   -  Reputation: 756

Like
1Likes
Like

Posted 24 May 2012 - 01:45 AM

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.

http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.


#3 AndreaTux   Members   -  Reputation: 182

Like
0Likes
Like

Posted 24 May 2012 - 03:02 PM

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~

#4 wqking   Members   -  Reputation: 756

Like
0Likes
Like

Posted 24 May 2012 - 08:00 PM

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

http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.


#5 AndreaTux   Members   -  Reputation: 182

Like
0Likes
Like

Posted 25 May 2012 - 02:53 PM

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~

#6 AndreaTux   Members   -  Reputation: 182

Like
0Likes
Like

Posted 30 May 2012 - 12:50 PM

Hello, try http://sourceforge.net/projects/luaj/ ! Just import .jar file and go!! :)
AndreaTux~




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS