开发者

How to add sudo for a debug configuration in Eclipse, in Ubuntu?

In eclipse for a particular debug configuration I need to put "sudo" before the executab开发者_如何学Gole in order to gain root privileges.

Is there a way to do this rather than launching eclipse with sudo?


You can run your java application with root privilege, then attach the process to debug.

sudo java -jar xxx.jar -vmargs -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000

attach the localhost:8000 to debug your app in eclipse

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜