Skip to main content


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 14:45 Go to next message
farokh morshed is currently offline farokh morshedFriend
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] Fri, 27 April 2012 03:49 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
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 12:57 Go to previous messageGo to next message
farokh morshed is currently offline farokh morshedFriend
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 14:33 Go to previous messageGo to next message
Michael Rennie is currently offline Michael RennieFriend
Messages: 67
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 21:57 Go to previous message
farokh morshed is currently offline farokh morshedFriend
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: Tue Apr 16 13:26:16 GMT 2024

Powered by FUDForum. Page generated in 0.76468 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top