开发者

Eclipse process launch

开发者 https://www.devze.com 2023-03-30 02:06 出处:网络
How can I get the process of a launched java application inside of a plugin? I am using: DebugUITools.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

精彩评论

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