Sub AppStart (Args() As String)
Dim shl As Shell
shl.Initialize("shl", "java", _
Array As String("-cp", "curl.jar", "b4j.example.main", "http://www.b4x.com"))
shl.WorkingDirectory = "C:\Users\H\Documents\B4J\Curl\Objects"
shl.Run(10000) 'set a timeout of 10 seconds
StartMessageLoop 'need to call this as this is a console app.
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success AND ExitCode = 0 Then
Log("Success")
Log(StdOut)
Else
Log("Error: " & StdErr)
End If
ExitApplication
End Sub