How do I run my application as superuser from Eclipse?

后端 未结 9 1591
闹比i
闹比i 2020-11-29 09:35

I\'m running in to an error when I try to run my server application from Eclipse. The error is java.net.BindException: Permission denied. I think this is be

9条回答
  •  长情又很酷
    2020-11-29 09:51

    You can use Remote Java Application mechanism for this.

    1. Create Debug configuration for Remote Java Application section in Run -> Debug configurations...
    2. Set your project name
    3. Choose Connection type as Standard (Socket Attach)
    4. Configure Connection properties parameters for your binding (for you it will be localhost and 443).
    5. Set breakpoint in your app (e.g. at the beginning of the main method)
    6. Run your app from terminal as superuser with following params: -java Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=443 MyApp
    7. Hit debug button in Eclipse for early created Remote Java Application
    8. You code should be stopped on breakpoint in Eclipse!

提交回复
热议问题