To use javaobject how you want, you will need to know the class names within org.luaj.vm2 and org.luaj.vm2.lib.jse.
You are trying to assign a package name with a wild card to a javaobject, this will not work as you have to assign a class to the javaobject.
The first line of your code above code would translate to something like :
B4X:
...
Dim jsePlatform As JavaObject
Dim globals As JavaObject
…
jsePlatform.InitializeNewInstance("org.luaj.vm2.lib.jse.JsePlatform",null)
globals = jsePlatform.RunMethod("standardGlobals",null)
…
That begs the question: how can one find the class names (and params) other than begging the author for some full documentation on it's use (which is often hard to obtain). De-compile the jar perhaps? Try and figure it out from there?
I have often wondered how - when using JavaObject - what to call, params and other requirements...
Samples provided (by Erel and others) give specific based on question... Where in the heck did they get that knowledge?
They make it seem so simple...
In the case above I simply googled "org.luaj.vm2 api" which returned the Javadoc for the package. This showed the classes within each of the package names.
The class Javadoc shows the methods , their return types and required parameters.