Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » how can I debug a Java application that must run as root?  () 1 Vote
how can I debug a Java application that must run as root? [message #857448] Thu, 26 April 2012 10:45 Go to next message
farokh morshed is currently offline farokh morshed
Messages: 3
Registered: April 2012
Junior Member
I have a Java application that must run as root. So, to debug it, I need to run the application being debugged as root. I don't see anything in the Debug Configuration wizard to do this.

Has anyone done this?
Re: how can I debug a Java application that must run as root? [message #858243 is a reply to message #857448] Thu, 26 April 2012 23:49 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam Kandula
Messages: 444
Registered: July 2009
Senior Member
Any problems to also run your eclipse also as root.
Re: how can I debug a Java application that must run as root? [message #859084 is a reply to message #858243] Fri, 27 April 2012 08:57 Go to previous messageGo to next message
farokh morshed is currently offline farokh morshed
Messages: 3
Registered: April 2012
Junior Member
Yes. Running Eclipse as root is not a good idea. At least not on Linux. What you really want, as I see references to people having done so using gdb, is to run the debugged process as root.
Re: how can I debug a Java application that must run as root? [message #859243 is a reply to message #857448] Fri, 27 April 2012 10:33 Go to previous messageGo to next message
Michael Rennie is currently offline Michael Rennie
Messages: 65
Registered: July 2009
Location: Canada
Member
You really only have two options (as I see it):

1. Run Eclipse as root - if you are using a debian variant you can use 'gksudo eclipse' to ensure security is maintained.

2. You can launch the program you want to debug from the command line with the VM arguments to remote debug it and then attach back to it from Eclipse. Here is a good talk about Eclipse remote debugging: http://www.eclipsezone.com/eclipse/forums/t53459.html
Re: how can I debug a Java application that must run as root? [message #859940 is a reply to message #859243] Fri, 27 April 2012 17:57 Go to previous message
farokh morshed is currently offline farokh morshed
Messages: 3
Registered: April 2012
Junior Member
Option 2 worked very well. Thank you.
Previous Topic:serialVersionUID template?
Next Topic:Eclipse 3.7.2 unusable due to frequent lockup
Goto Forum:
  


Current Time: Sun Apr 20 19:47:13 EDT 2014

Powered by FUDForum. Page generated in 0.01667 seconds