Sub AppStart (Args() As String)
RunJPS
StartMessageLoop
End Sub
Sub RunJPS
Dim shl As Shell
shl.Initialize("shl", "where.exe", Array("jps.exe"))
shl.Run(-1)
Wait For shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success And ExitCode = 0 Then
StdOut = StdOut.Trim
shl.Initialize("shl", StdOut, Array("-l"))
Log(StdOut)
shl.Run(-1)
Wait For shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log(StdOut)
Else
Log("error finding jps.exe")
End If
End Sub