开发者

Eclipse process launch

How can I get the process of a launched java application inside of a plugin? I am using:

DebugUITools.launch();  

to launch the application. I have tried to use:

IProcess cur = DebugUITools.getCurrentProcess(); 

but it returns null at the beginning of the application launch.

Actually, my aim is to read from the console of the running application and by having the current process I tried to cal开发者_运维知识库l:

DebugUITools.getConsole(IProcess process); 

which returns the console. The Q now is how to read from this console programmatically.


Instead of calling launch(), call buildAndLaunch(), which gives you the ILaunch back. You can ask the ILaunch for IProcess objects.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜