nirhal / JLua

JLua is a scripting tool for Java. JLua is a fork of LuaJava. It includes many bug fixes and new features.
MIT License
17 stars 1 forks source link

Android Support #1

Open Rami-Sabbagh opened 6 years ago

Rami-Sabbagh commented 6 years ago

Hello, First of all, thanks for all of this awesome work !!

Second, is it possible to support Android ? I found some repos that has LuaJava for Android, but you know, it's not maintained, It would be very awesome.

I'm thinking of combining JLua/LuaJava with LÖVE for Android, so super awesome things could be made, making this library very useful

Regards, RamiLego4Game

nirhal commented 6 years ago

Hi Rami,

JLua already works with Android (and fully tested). There is even an app that uses JLua as an add-on mechanism: https://play.google.com/store/apps/details?id=com.amnis

I'll try to add compilation instructions for Android to the README file soon.

Nir

Rami-Sabbagh commented 6 years ago

Question: Is it possible to initialize (load) the library from the Lua side ? and it would hook to the app vm ? or not ?

LÖVE is written in native code, and has luajit running.

nirhal commented 6 years ago

No, I'm afraid that's not possible. Currently, the JVM object is passed to the native code that runs JLua. On android, it's impossible create a new JVM object from native code.