Eclipse IDE compile or run as root in OSX?

Posted on 2012-09-05
Last Modified: 2012-09-06
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?

Question by:mmedi005
    LVL 12

    Expert Comment

    by:Sharon Seth
    Can you be a bit more descriptive pls
    LVL 86

    Accepted Solution

    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
    LVL 86

    Expert Comment

    :) What did you do in the end?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now