b4x-de Active Member Licensed User Longtime User Dec 20, 2021 #1 Hello, I'm starting jServer by using a shell with this code: B4X: shServer.InitializeDoNotHandleQuotes("SvrStart", mstrJavaCmd, Array As String("-jar", Main.EXEC_SERVER)) shServer.WorkingDirectory = strDirSrv shServer.Run(-1) I'm currently using this code to shutdown a running jServer from code (inside a servlet handler): B4X: Dim jserver As JavaObject = srvr.As(JavaObject).GetField("server") jserver.RunMethod("stop", Null) It works - but is it the propper way doing a shutdown? I can still see the process started the jar in TaskManager. Thanks, Thomas Last edited: Dec 20, 2021
Hello, I'm starting jServer by using a shell with this code: B4X: shServer.InitializeDoNotHandleQuotes("SvrStart", mstrJavaCmd, Array As String("-jar", Main.EXEC_SERVER)) shServer.WorkingDirectory = strDirSrv shServer.Run(-1) I'm currently using this code to shutdown a running jServer from code (inside a servlet handler): B4X: Dim jserver As JavaObject = srvr.As(JavaObject).GetField("server") jserver.RunMethod("stop", Null) It works - but is it the propper way doing a shutdown? I can still see the process started the jar in TaskManager. Thanks, Thomas
Erel B4X founder Staff member Licensed User Longtime User Dec 21, 2021 #2 Use ExitApplication. Upvote 0