Eclipse IDE compile or run as root in OSX?

Eclipse IDE compile or run as root in OSX?

We are trying to run snmp trap on port 162 but wont because a port under 1024. How can I bypass this so I can compile and run the program without this error?

Who is Participating?
CEHJConnect With a Mentor Commented:
You don't need to be root to compile it - only run it. So you could just compile it and then run it as root. If you need to do both at the same time, try the following at the command line

sudo eclipse &

Open in new window

I don't know if that generic Unix command will work in OSX, but i'd guess so. Bear in mind that the effect of that might easily be to attempt to use ~/workspace of root, so you'd need to copy the current project into root's home directory.

Another thing you could try is to alter the runtime command to something like
 sudo java -jar theapp.jar

Open in new window

but i don't know offhand how to do that
Sharon SethCommented:
Can you be a bit more descriptive pls
:) What did you do in the end?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.