I need to launch the module jar from a secondary menu extra, I used this code, but without results
B4X:
Sub bt_extras_Action
' path = C:\Users\MONIVA\odrive\Box\B4IOSP~1\PROJEC~1\ASSOCI~1\Objects\Moduli\test.jar
Dim item As MenuItem = Sender
Dim path As String = File.Combine(File.DirApp, item.Tag)
Dim sh As Shell
sh.Initialize("sh",path,Null)
sh.Run(-1)
End Sub
I used this code and it works, but now the problem and how to pass values to variables!!
B4X:
Sub bt_extras_Action
Dim item As MenuItem = Sender
Dim path As String = item.Tag
Dim folder As String = File.DirApp & "\\Moduli"
If File.Exists(folder,item.Tag) = True Then
Dim sh As Shell
sh.Initialize("sh", "java", Array As String("-jar", path))
sh.WorkingDirectory =folder
sh.Run(-1) 'set a timeout of 10 seconds
Else
Return
End If
End Sub