You can take a look at my sample, it should be a starting point (You need Java 14 to run it).
Hello everybody. Anybody knows why the following code is not working? Does it have anything to do with the b4j version? I have version 10.00 Beta which is the latest as I think. Thanks. #Region Project Attributes #MainFormWidth: 600 #MainFormHeight: 600 #End Region Sub Process_Globals...
www.b4x.com
Hi,
I look at the sample and copy the code into the main of my project
Here is how it is organized
This is in app start sub
' loadWebView1 is the webview name that i use
Dim WebviewJo As JavaObject = loadWebview1.As(JavaObject)
Dim WebEngine As JavaObject = WebviewJo.RunMethodJO("getEngine",Null)
Dim currentInstance As JavaObject = Me
currentInstance.RunMethod("setBridge", Array(WebEngine))
... more stuff
End appStart sub
i put the java code at the end of the main module where i put all my java stuff in there as describe in your sample
i use the JDK14 and the javaobject 2.06 that i think is internal, the IDE version is 9.80 (64bits)
Question:
The thing that i don't understand is it can find getEngine in B4A object is this method been removed from the java version 2.06 or
my version of java is not up todate i don't understand why.
Can someone shed a little bit of light on this and can tell me if the javaobject is the right version for it
i'm in the process to update my IDE to the version 10.0 so that i can be up todate in the developement environment
Using the sample code i change a few things for my own environment but when i execute i got an error like
java.lang.RuntimeException: Method: getEngine not found in: anywheresoftware.b4a.objects.Timer
at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:363)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:120)
at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:139)
at douanessn.essic.sn.main$ResumableSub_AppStart.resume(main.java:1155)
at douanessn.essic.sn.main._appstart(main.java:1087)
other stuff not relative to this error not important from the stack.