a***a 发帖数: 161 | 1 sorry for not input chinese, but this is REALLY an INTERESTING problem!
in my code I want to use Runtime().exec() to start
QuickTimePlayer and wait until quicktimeplayer is terminated
by the user, as shown below. The thing is, p.waitFor()
should return AFTER the quicktimeplayer quits; however, I
found that if there is already some instances of qtplayer
running, p.waitFor() will return immediately, and
p.exitValue() gets 0-success. I wonder if there is some
tricks that can deal with this situatio | m******t 发帖数: 2416 | 2
[...]
I suspect it's some application-dependent behavior. Upon starting,
most applications try to detect if there has already been another
instance of the same application running. If that's the case, some
application simply quit (QuickTime player would be an example of this
category), some others might "join" the existing instane (e.g. IE
or Word).
【在 a***a 的大作中提到】 : sorry for not input chinese, but this is REALLY an INTERESTING problem! : in my code I want to use Runtime().exec() to start : QuickTimePlayer and wait until quicktimeplayer is terminated : by the user, as shown below. The thing is, p.waitFor() : should return AFTER the quicktimeplayer quits; however, I : found that if there is already some instances of qtplayer : running, p.waitFor() will return immediately, and : p.exitValue() gets 0-success. I wonder if there is some : tricks that can deal with this situatio
|
|