Questions tagged [luajava]

A scripting tool for Java that allows easy interfacing of Lua and Java code by allowing Lua code to access and manipulate Java objects and allowing Java code to implement interfaces using Lua.

LuaJava is a scripting tool for Java that allows scripts written in Lua to manipulate components developed in Java and also access components from Lua using the same syntax that is used for accessing Lua`s native objects. It also allows Java to implement an interface using Lua.

The official website is http://www.keplerproject.org/luajava/.

55 questions
0
votes
1 answer

Luajava: change java public static variable value in lua

I have following java code. public class Settings { public static float delay= 3f; // in seconds } And following lua code local a = luajava.bindClass("Settings"); print (a.delay) -- works normally -- a.delay = 5; -- this will cause "attempt…
WeiHung
  • 109
  • 2
  • 10
0
votes
2 answers

Lua global table different in different files

I use the AndroLua port of LuaJava on Android and when I define a global table in file A and try to access it from file B some entries are missing: file A: Game = { name = "name" } function Game:init() self.score = 7 self.player =…
user4155013
0
votes
1 answer

LuaJava - unprotected error in call to Lua API

I'm trying to get a simple function working in LuaJava (adding two numbers). I have very little experience with Lua, and am finding this difficult as I haven't been able to find in depth documentation for LuaJava. I can currently print out to the…
0
votes
1 answer

Installing LuaJava

I have a Mac version 10.9 and I'm trying to build LuaJava. I built Lua 5.0 no problems, but when using this tutorial I get this error: In file included from src/c/luajava.c:39: src/c/luajava.h:2:10: fatal error: 'jni.h' file not found #include…
helsont
  • 4,347
  • 4
  • 23
  • 28
0
votes
1 answer

LuaJ require json module in java

Im trying to load the json module in Java code. The example in the Doc shows that it should go like this but it doesnt work. Does it require the module to be in the project or it loads it from LUA_PATH. does anyone have any experience with this…
alknows
  • 1,972
  • 3
  • 22
  • 26
0
votes
2 answers

Force an integer type in luajava

Is there any way to force an integer type using LuaJava? I am attempting, in LuaJ 3.0 beta 1 (luaj-jse-3.0-beta1.jar), to create an instance of a java.awt.Color. You wouldn't think this would be such an issue, given the Java API availability of…
Nathan
  • 585
  • 6
  • 12
0
votes
1 answer

LuaJava Unsatisfied Link Error

I have a super simple program. And whenever I try running it in Eclipse I get this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no luajava-1.1 in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at…
TheNickmaster21
  • 275
  • 3
  • 13
0
votes
1 answer

Proguard config when using luajava

Trying to Proguard my app that uses luajava (with AndroLua) and it runs fine until I proguard it and then it fails to start, i just get a black screen, and the logs fill up with the below entries which don't stop until app is uninstalled. I'm…
scottyab
  • 23,621
  • 16
  • 94
  • 105
0
votes
1 answer

Passing String arg to Lua method with LuaJava in AndroLua

I have a Lua function defined in a Java String, and I'd like to pass it a String arg String luaCode = "function hello(name) return 'Hello ' + name +'!' end"; Executng code public String runGreetingFromLua(String src, String arg) throws LuaException…
scottyab
  • 23,621
  • 16
  • 94
  • 105
-1
votes
1 answer

Compile LuaJava under Ubuntu 32bit

I'm pretty new to linux and using external code from java. I'm trying to compile LuaJava lib. I type 'make' and get such errors: src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1getField’: src/c/luajava.c:2560: error:…
user468311
1 2 3
4