B4J Question [solved] Shell - open file external

ivanomonti

Expert
Licensed User
Longtime User
I'm creating the plug-ins section again (open my .jar created with b4j) and everything runs smoothly, but after 10 seconds or more open application chude again.

I remember that @Erel told me to send some parameters in an array to put some keys in string format and then read them in the main of the app that is opened, in this way I also put the values of the database, a key that I read serenely, app opens and shortly after it closes.

Where do I make the mistake?

App master

B4X:
Private Sub plugins_ValueChanged (Value As Object)
   
    Dim cb As ComboBox = Sender
    If cb.SelectedIndex = 0 Then Return
   
    Dim lb As Label = Value
    Dim shl As Shell
    Dim m As Map =  lb.Tag
    shl.Initialize("shl", "java", Array As String("-cp", m.GetValueAt(2), "b4j.plugins.ivanomonti.main", "xxxxx", File.Combine(File.DirApp,"Lavagna.sqlite"), Main.idlogin) )
    shl.WorkingDirectory = m.GetValueAt(3)
    shl.Run(10000)
   
End Sub

plugins main


B4X:
Sub AppStart (Form1 As Form, Args() As String) As Boolean
   
   
   
    MainForm = Form1
    MainForm.RootPane.LoadLayout("ChartLayout")
    MainForm.Title="Module Chart v 1.0.0"
    MainForm.Stylesheets.Add(File.GetUri(File.DirAssets,"css-33.css"))
    MainForm.Show
   
    DatePicker1.DateFormat="yyyy-MM-dd"
    DateTime.DateFormat="yyyy-MM-dd"
   
   
   
    If debugMode= False Then
        If Args.Length > 0 Then
            If Args(0) <> "xxxx" Then
                fx.Msgbox(MainForm,"Module for Lavagna","Error system message")
            Else
                path=Args(1)
                idlogin=Args(2)
            End If
        End If
    Else
        path= File.Combine(File.DirApp,"lavagna.sqlite")
        idlogin="xxxxxxxxxxx"
    End If
       
End Sub
 
Last edited:
Top