B4J Question Open or kill application ?

hookshy

Well-Known Member
Licensed User
Longtime User
I guess I need a more simpler way ... I need to hide a panel when the apps is started by a certain app ...
When the apps starts by dobleclick on the .jar file then ...the panel will hide other wise if is start the app internally I must display a status bar ...inside a pannel
 
Upvote 0

hookshy

Well-Known Member
Licensed User
Longtime User
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
B4X:
   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
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Not having used shell, but I guess -cp is classpath, where the jvm will look for the jar files you tell it to run.
Also the second parameter you changed to 'jar' , I think has to be 'java' as that is what runs the jvm.
 
Upvote 0
Top