dim s as new shell
dim f as FolderItem=GetFolderItem("").Child("vnc")
s.mode=0
dim cmd as String
cmd="java -jar "+ f.ShellPath +"/viewer.jar -host="+ip+" -password="+passwd+" -showConnectionDialog=No"
s.Execute (cmd)
but it blocks the main ui. Changing to mode 1 or 2 does not block the main ui but won’t start the java applet.
Since this is a local Property in your method, it’ll go out of scope before the (async) process is finished. So it works “by design”
Or you could add a property s of type Shell to your window and use that in your method: self.s = new shell. That way it should not get out of scope too soon (unless you’re closing the Window).