I tried a few different ways, I couldn't make this shell output work.
I tested .jar on ubuntu, when I run same code it works.
Not raising also any exception. It is a console application.
Looks like when I make shell call, application stops working. Never reaches to Log("Operation complete")
Please if anyone knows why ?
I tested .jar on ubuntu, when I run same code it works.
Not raising also any exception. It is a console application.
Looks like when I make shell call, application stops working. Never reaches to Log("Operation complete")
Please if anyone knows why ?
B4X:
Try
Dim shl As Shell
shl.Initialize("shl", "/usr/bin/mpstat", Array("-P","ALL"))
shl.Run(-1)
Wait For shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log("done")
Log("Ecode:"&ExitCode)
Log("Error:"&StdErr)
Log("out:"&StdOut)
Log("Status:"&Success)
Catch
Log("Error execution")
Log(LastException)
End Try
Log("Operation complete")