Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Luaj Use java run the lua sprite, and Calling the Java object backwards is NULL #101

Open
Yecgaa1 opened this issue Feb 25, 2022 · 3 comments

Comments

@Yecgaa1
Copy link

Yecgaa1 commented Feb 25, 2022

1

I use debugging, and I'm pretty sure the code will execute to get there. but
Does it seem impossible to call Java backwards in a Lua script, but create a completely new JVM?
Otherwise why do I call all variables null, even if it's static.
Did I miss any important code? Or do I have a problem with my intentions?

@dianwangwin
Copy link

me too and i dont know what happened

@dianwangwin
Copy link

1

I use debugging, and I'm pretty sure the code will execute to get there. but Does it seem impossible to call Java backwards in a Lua script, but create a completely new JVM? Otherwise why do I call all variables null, even if it's static. Did I miss any important code? Or do I have a problem with my intentions?

可能是Class Loader的问题

@orange451
Copy link

orange451 commented May 20, 2022

I would suggest calling the load() method from Globals, instead of loadFile(). This means you have to write your own file-reading code. It will help in debugging why it cannot load your script.

Additionally, in my implementation, I use the invoke() method instead of call() method.

--
在Globals里面应该用的是Globals#load()。不要用Globals#loadFile()。
还有一个就是,在我的APP里面,我不用LuaFunction#call(), 我用的是LuaFunction#invoke()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants