You can use the jShell library to start other processes and then kill them.
I do have some problems starting the apps ...main reasons are:
My apps is an .jar archive that has no xxx.xx.main ...java file ..
I do not understand arguments
I have included #CommandLineArgs: jFx-hmi.test in project Attributes
I have copied the corect path to directory ..where my .jar file is found
I do not now what "-cp" ???
I did modified original "java" argument to "jar"
I did set up my the apps package name "com.myapp"
Error: Illegal option: p
Dim shl As Shell
shl.Initialize("shl", "jar", _
Array As String("-cp", "1.jar", "com.myapp", "jFx-hmi.test"))
shl.WorkingDirectory = "D:\basic4java\forum_ex\project"
shl.Run(10000) 'set a timeout of 10 seconds