It would be great to add a tag to the jShell jobs. That way it would be easier to link the command result to something else.
B4X:
Private Sub Shell_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Dim sh As Shell = Sender
Log(sh.Tag)
'....
End Sub
Note that there is another solution for this. You can use a Map with the jShell objects as keys. This will allow you to get the "tag" value from the Sender.
Note that there is another solution for this. You can use a Map with the jShell objects as keys. This will allow you to get the "tag" value from the Sender.