Sub Process_Globals
End Sub
Sub AppStart (Args() As String)
Dim shl As Shell
Try
shl.Initialize("shl", "java.exe" , Array As String("-jar", "Your.jar"))
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
Catch
Log(LastException.Message)
End Try
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success Then
Log(StdOut)
End If
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub ExitButton_Click
Dim sf As Object = xui.Msgbox2Async("Proggi wird neu gestartet !","Neustart","OK","","Abbruch", Null)
Wait For (sf) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dim shl As Shell
Try
shl.Initialize("shl", "java.exe" , Array As String("-jar", "YourRestart.jar"))
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
Catch
Log(LastException.Message)
End Try
Log("Neustart!!!")
ExitApplication
End If
End Sub
You can create another program that starts the first program after 1-2 seconds. Start the second program with jShell and call ExitApplication.