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
1
vote
0 answers

How to call java API from Lua Script using LuaJava

I have one java program written but because of the application issues I can not call it directly, instead I can use Lua script. Can anyone please help me and guide me that is it possible to call that Java program fro the Lua script. I am very new to…
Pranav
  • 85
  • 1
  • 2
  • 5
1
vote
2 answers

Embedding the Lua shell into a Java Application (LuaJava)

I am working on a app, It has a GUI (But not Java swing and JFrame stuff) I want to incorporate the Lua shell into the GUI. LuaJava doesn't have good documentation (or atleast for me) on how to do this.
1
vote
1 answer

LuaJava: Importing a whole Lua-Table into Java-like array with LuaJava

I'm really stuck at this, searched my ass of google definitely, trying to "import" a table from lua to an array in java with luajava... Now, I've been able to do some easy stuff, printing lua-vars in java and reading a single element from a table..…
bengalo
  • 13
  • 4
0
votes
1 answer

Returning multiple values with LuaJava

I need to be able to return an (X, Y) position from Java to Lua and I can't figure out how to do it. With the C API you would just push the values onto the stack and then return the number of return values, but that doesn't seem to be how LuaJava…
CaseyB
  • 24,780
  • 14
  • 77
  • 112
0
votes
1 answer

LuaJava Eclipse

I finally managed to get LuaJava to build on OSX and now I am running into trouble using it in Eclipse. I put the jnilib in my system path and when I go to the directory where I built it I can run the Console like this: $ java -cp "luajava-1.1.jar"…
CaseyB
  • 24,780
  • 14
  • 77
  • 112
0
votes
0 answers

How to pass java object to lua then pass it back

I'm using luajava. want to do like this local result = luajava.newInstance("org.foo.Bar",javaobj); Then i found i can't use javaobj as a argument too many method needs a javaobj as argument but i can't use complex argument in lua
0
votes
0 answers

multy window from Lua

public static ActivityOptions getActivityOptions(Context context) { ActivityOptions options = ActivityOptions.makeBasic(); int freeform_stackId = 5; try { Method method = ActivityOptions.class.getMethod("setLaunchWindowingMode",…
WANDEL
  • 1
  • 3
0
votes
0 answers

How can I call the Android Rect function from Lua?

uri = "https://www.google.com/maps/dir/?api=1&travelmode=driving&origin=50.291793,30.355700&destination=50.400024,30.623489" local Intent = luajava.newInstance("android.content.Intent") local Uri =…
WANDEL
  • 1
  • 3
0
votes
0 answers

Starting up with Luaj

Are there any good Luaj tutorials? I have been working on a game using Lua for for mi finals but my profesor wants me to implement my code to java. I already read the Luaj manual but i found it quite confusing and i need to implement mi lua code…
Joax48
  • 1
0
votes
1 answer

Open Arrays or ArrayLists in Lua (Convert array to table)

A method in java returns an Array, and I want to manipulate the information from that array in Lua but it seems that Lua doesn't convert arrays to tables as I'd hoped. Is there a way to do this? For example I have this method in Java: public Node[]…
Timotheus
  • 2,250
  • 5
  • 29
  • 39
0
votes
1 answer

How to get "android.provider.ContactsContract.Contacts" field in Luaj

I use Lua Interpreter to get information for my iGO navigator and I need to get some fields from android.provider.ContactsContract.Contacts I got successfully cntr = luajava.bindClass("android.provider.ContactsContract") and I try to get Contacts…
WANDEL
  • 1
  • 3
0
votes
1 answer

How to get the list of running applications from LuaJ?

I am working on an app which needs to run external LuaJ Interpreter to get the information of the apps running at the system up to now. I found there an code in Java, but not on LuaJ. This is my attempt to do something. local pm =…
WANDEL
  • 1
  • 3
0
votes
1 answer

Difference between bindClass and newInstance

What is the difference between these two functions in luajava: -- I know this creates a new instance of a class local instance = luajava.newInstance("path.to.class"); -- But it seems this does as well? local class =…
Charanor
  • 810
  • 8
  • 23
0
votes
1 answer

CreateProxy for Android (LuaJava)

I've got a Lua function Button, which creates a button, add it to the layout and returns the button. Then I want to add to it ClickListener local button = Button ("text", MATCH_PARENT, WRAP_CONTENT) button: setOnClickListener (luajava.createProxy…
Perkovec
  • 101
  • 1
  • 4
0
votes
1 answer

LuaJava and Latest LuaBinaries

Does anyone know if LuaJava works out of the box with the latest LuaBinaries or just the 5.1.1 binaries? Thanks. http://www.keplerproject.org/luajava/index.html
Unrealomega
  • 107
  • 2
  • 9