Dim p1 As List
p1.Initialize
p1.Add($"java"$)
p1.Add($"-jar"$)
p1.Add($"lgmtengine.jar"$)
p1.Add($"${EngId},${linegatePt}"$)
ExecuteJar("execengine",p1,showcmd)
Sub ExecuteJar(event As String,params As List,showwnd As Boolean) As String
If DetectOS<>1 And False Then
' linux
Dim shl As Shell
shl.Initialize(event, "java" , params)
Dim s1 As String = shl.Arguments
'shl.Initialize("shl", "cmd" , params)
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
' shl.RunWithOutputEvents(-1)
Dim rets As String="java"
For Each s1 As String In params
rets = $"${rets} ${s1}"$
Next
Return rets
Else
' window
If showwnd Then
params.InsertAt(0,"start")
End If
'params.InsertAt(0,"/k")
params.InsertAt(0,"/c")
Dim shl As Shell
shl.Initialize(event,"cmd",params)
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
End If
End Sub