由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Runtime.exec() 问题
相关主题
问一个关于access object instance的问题Re: The real Risk
Apply lock on a class.Talk a little more about How to lock a file
Applet/Swing处理实时一点儿的图形程序可行吗?Re: unix环境下如何在java程序中执行命令行?
Exception in thread "main" java.lang.NoClassDefFoundErrorRe: Entity EJB: anyone with real experience
这道题该走什么路.net vs. J2ee(zhuan)
Re: How can I call another program from Java?Java Telnet Client Implementation v0.99Beta
Java runtime?JAVA RUNTIME.EXEC 一问
Re: 怎么能是JAVA里的数组开的更大?Starter's problem
相关话题的讨论汇总
话题: some话题: return话题: qtplayer
进入Java版参与讨论
1 (共1页)
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

1 (共1页)
进入Java版参与讨论
相关主题
Starter's problem这道题该走什么路
question about JbuilderRe: How can I call another program from Java?
javac命令行中path的空格问题Java runtime?
help on this scope questionRe: 怎么能是JAVA里的数组开的更大?
问一个关于access object instance的问题Re: The real Risk
Apply lock on a class.Talk a little more about How to lock a file
Applet/Swing处理实时一点儿的图形程序可行吗?Re: unix环境下如何在java程序中执行命令行?
Exception in thread "main" java.lang.NoClassDefFoundErrorRe: Entity EJB: anyone with real experience
相关话题的讨论汇总
话题: some话题: return话题: qtplayer