1

在 Eclipse 中,对于特定的调试配置,我需要将“sudo”放在可执行文件之前以获得 root 权限。

有没有办法做到这一点,而不是用 sudo 启动 Eclipse?

4

1 回答 1

0

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

于 2010-11-02T15:18:50.107 回答