How can I call it from lua? I tried various methods, but none worked:
test({}}
-- Error: attempt to call a nill value
test(luajava.newInstance("[Ljava.lang.Object;")
-- Error: vm error: java.lang.NullPointerException: Attempt to invoke virtual method 'org.luaj.vm2.Varargs org.luaj.vm2.LuaValue.invoke(org.luaj.vm2.Varargs)' on a null object reference
test(luajava.newInstance("[Ljava.lang.Object;", 1)
-- Error: vm error: java.lang.NullPointerException: Attempt to invoke virtual method 'org.luaj.vm2.Varargs org.luaj.vm2.LuaValue.invoke(org.luaj.vm2.Varargs)' on a null object reference
There is a method in Java:
How can I call it from lua? I tried various methods, but none worked: