Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Eclipse 中,对于特定的调试配置,我需要将“sudo”放在可执行文件之前以获得 root 权限。
有没有办法做到这一点,而不是用 sudo 启动 Eclipse?
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