Hi
Form my main application will lunch db.ProcessExecute("node4report.jar") but shl_ProcessCompleted always give me following message,Why ?
191154 ProcessCompleted(false,-559038737,,org.apache.commons.exec.ExecuteException: The stop timeout of 500 ms was exceeded (Exit value: -559038737))
node4report.jar
n1=0,1,2 so ExitApplication2 will return 0 or 2
Form my main application will lunch db.ProcessExecute("node4report.jar") but shl_ProcessCompleted always give me following message,Why ?
191154 ProcessCompleted(false,-559038737,,org.apache.commons.exec.ExecuteException: The stop timeout of 500 ms was exceeded (Exit value: -559038737))
B4X:
Sub ProcessExecute(ExeName As String) As Boolean
Dim shl As Shell
Dim params As List: params.Initialize
params.Add("/k")
params.Add("start")
If ExeName.ToLowerCase.Contains(".jar") Then
params.Add("java")
params.Add("-jar")
End If
params.Add(ExeName)
' shl.Initialize("shl",ExeName,Null)
shl.Initialize("shl","cmd",params)
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
' Run cmd /k java -jar <your jar>
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, so As String, se As String)
dtlog($"ProcessCompleted(${Success},${ExitCode},${so},${se})"$)' Completed ")' & ExitCode & " " & so & " " & se)
End Sub
node4report.jar
n1=0,1,2 so ExitApplication2 will return 0 or 2
B4X:
Sub timer1_tick
Timer1.Enabled=False
Timer1.Interval=5000
If Items.Size>0 Then
Dim n1 As Int=CheckUpdate(DateTime.now)
If n1<>1 Then
ExitApplication2(n1)
Return
End If
End If
Timer1.Enabled=True
End Sub