You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! this is only a question, i'm writing a tool to run JS Code from a JS File, but i can't see a way to make an java static method accessible via JavaScript, i saw the V8Object source code and i don't see anything about, and i tried using Class.getMethod, but this 3 lines blocked me: J2V8/src/main/java/com/eclipsesource/v8/V8Obiect.java at line 633
At that moment, the variable object is an Class<?> object, and the methodName is obtained by class.getDeclaredMethods() -> .getName() inside a for loop, the problem is: Because of the variable object is a Class<?>, when the code call .getClass(), the code will access Class<Class> and will give an NoSuchMethodException because the method name that i give doesn't exists on the Class<Class> class.
Is there a way to register java static methods with J2V8?
The text was updated successfully, but these errors were encountered:
Hi! this is only a question, i'm writing a tool to run JS Code from a JS File, but i can't see a way to make an java static method accessible via JavaScript, i saw the V8Object source code and i don't see anything about, and i tried using Class.getMethod, but this 3 lines blocked me:
J2V8/src/main/java/com/eclipsesource/v8/V8Obiect.java at line 633
At that moment, the variable
object
is anClass<?>
object, and the methodName is obtained byclass.getDeclaredMethods() -> .getName()
inside a for loop, the problem is: Because of the variableobject
is aClass<?>
, when the code call.getClass()
, the code will accessClass<Class>
and will give an NoSuchMethodException because the method name that i give doesn't exists on theClass<Class>
class.Is there a way to register java static methods with J2V8?
The text was updated successfully, but these errors were encountered: