Sign in to follow this  
Pennywise1911

Best way to use LUA in Java?

Recommended Posts

Hi!

I think it would be really nice to use Lua in my Java game for some stuff like the interface and some stuff I want to extend on the fly without recompiling (items for example). Maybe I'll use it for scripts in maps as well.

I found 3 ways to use Lua in Java. LuaJ, LuaJava and Kahlua2. Kahlua2 was the only project I could build on my system but the tests, which Kahlua2 does after compiling, failed. LuaJ couldn't find something called "Sun wireless <can't remember the rest>" and LuaJava couldn't find the jni.h and I wasn't able to create a new one.

I'm really pissed at the moment because I've got to use Java. Normally, I wouldn't use it because I'm a huge fan of Objective-C but I've got some people who help me and they don't own a Mac and GNUstep is a little bit scary because you don't hear anything new about it and they have some conditions you need to follow (you can't use every library and stuff like that. But I don't know how much I need there libraries). Additionally, I had some very weird errors while compiling some projects but this is another topic. But the point is: Objective-C = C and it was pretty easy to use Lua and extend is like I want (I built a small networking library) and it just works without any "Q.Q you need to use third party stuff because you can't just call native stuff out of Java even if you know what the hell you are doing!".

I also think about the idea to write my own wrapper for Lua. Maybe this would solve all my problems but I think this will consume a lot of time and it would be easier to use another scripting language.

But I don't want to use another language. I like Lua and actually, Lua is the only scripting language I really know and I really like. I could vomit every time I've got to deal with PHP and JS. I never used Ruby and Python. Maybe I could switch the language but this should be the last option. I want Lua!

thanks for reading
P.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this