Private Sub Command1_Click()
Dim LINK As String
Dim PARAM1 As String
Dim PARAM2 As String
PARAM1 = "TEXTO1"
PARAM2 = "TEXTO2"
LINK = App.Path & "\TESTbd.jar"
ShellExecute Me.hwnd, vbNullString, LINK, PARAM1 & "/" & PARAM2, "", vbNormalFocus
End Sub
Sub AppStart (Form1 As Form, Args() As String)
Dim mat() As String
Dim miArg As String
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
miArg=Args
mat=Split(miArg,"/")
param1.Text =mat(0)
param2.text=mat(1)
End Sub
Sub Split(Text As String, Delimiter As String) As String()
Return Regex.Split(Delimiter,Text)
End Sub
You can use jShell library to execute external apps.
Create this program and run it from the command line:
B4X:Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.Show Dim l1 As List l1.Initialize2(Args) Log(l1) End Sub