B4J Question Using inline Java in B4J

rossati

Active Member
Licensed User
Longtime User
Hello
I would access Windows Common Objects from B4J and, I presume I need inline Java.
I tried the example in article Inline Java Code but i have had en error on
NativeJava.InitializeContext
because this is (Core tells) only for B4A.

Where can I see an example in B4J?
Thanks
B4X:
#If JAVA[/SIZE][/SIZE]
[SIZE=4][SIZE=3]public String FirstMethod() {
   return "Hello World!";
}
#End If
Sub Process_Globals
    ...
    Private NativeJava As JavaObject
End Sub

Sub AppStart (frm As Form, Args() As String)
    NativeJava.InitializeContext
    Dim s As String = NativeJava.RunMethod("FirstMethod", Null)
...
 
Top