B4J Question IS possible to prepare a Jar file that opens with such parameters

desof

Well-Known Member
Licensed User
Longtime User
IS possible to prepare a Jar file that opens with such parameters

Shell App.Path & "/ file.jar" & Param, vbNormalFocus
 

derez

Expert
Licensed User
Longtime User
The app_start has it:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
You can find it in b4j tutorials
 
Upvote 0

desof

Well-Known Member
Licensed User
Longtime User
Necesito que desde una aplicación echa en Vb6 le pase 2 parámetros a una app .jar echa con V4J. Será de la siguiente forma:

Code VB6:
B4X:
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



y para recibir desde la app .jar Code B4J :
B4X:
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


PERO NO ME FUNCIONA!!

QUE HAGO MAL?
 
Last edited:
Upvote 0

desof

Well-Known Member
Licensed User
Longtime User
You can use jShell library to execute external apps.


But I need not run from B4j but otherwise need to open the application run from VB6 with parameters.
But I can not read the parameters correctly.
 
Upvote 0

desof

Well-Known Member
Licensed User
Longtime User


OK!!!!!!!!!
CONGRATULATIONES!!!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…