Here is ex how to call new instance of java obj, but how to import mylib.jar
is not explained
For ex. I have mylib.jar
and there is class com.example.MyClass
.
public class MyClass{
public String getHelloPersonName(String name){
return "Hello, " + name;
}
I want to create the java class instance and call this method
How to import the .jar
file to the lua
code, and create an instance of MyClass
and call method from it?
function init()
end