B4J Question Could i includ java class into B4J ?

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

I have upload a java files as Socket2Air.Zip. This is a jave class,let we send text GSM with socket. Could i use them in B4J ?
 

Attachments

  • Socket2Air.zip
    8.1 KB · Views: 163

Daestrum

Expert
Licensed User
Longtime User
My jCompiler library can load class files into the JVM at runtime. (make sure you pick the correct one java7 or java8 version).
I will check if it can handle the number of parameters for the calls.
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
My jCompiler library can load class files into the JVM at runtime. (make sure you pick the correct one java7 or java8 version).
I will check if it can handle the number of parameters for the calls.

These file were downloaded from my telephone service company.;)
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Example use (not tried to send anything)
B4X:
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim jc As jCompiler ' include the library jCompiler (for java 8) not jCompiler7
End Sub

Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
jc.loadTheClass("sock2air","classes/") ' this is a folder off of Objects folder eg, Objects/classes
Log(jc.listMethods("sock2air")) ' to prove class is loaded
'jc.run2("main",Array("params","For","routine")) ' example call
End Sub
 
Upvote 0
Top