Search:

Type: Posts; User: hooshdar3

Search: Search took 0.08 seconds.

  1. Replies
    11
    Views
    1,526

    Re: Why runtime error?

    This is the only info I get:

    ExecDemo.java:20: cannot find symbol
    symbol : method exec(java.lang.String,java.lang.String)
    location: class java.lang.Runtime
    p = r.exec("top" , "-n1");...
  2. Replies
    11
    Views
    1,526

    Re: Why runtime error?

    exec("top", "-n1"); errors at compile time
  3. Replies
    11
    Views
    1,526

    Re: Why runtime error?

    I expect the same output as when exdecuting free-m or top -n1 from the command prompt/terminal

    --- Update ---

    I look for a call similar to C++ system(), most efficient.
  4. Replies
    11
    Views
    1,526

    Re: Why runtime error?

    I called waitFor() for the 2nd instance of the process, but nothing appeared at the output.
    Similar;y, I wrote:

    again, with no result whatsoever.
  5. Replies
    11
    Views
    1,526

    Re: Why runtime error?

    This is my screen output:
  6. Replies
    11
    Views
    1,526

    Why runtime error?

    Hello.
    I get a run-time error executing my code. Can anyone tell me why?

    Thanks in advance

    Here is my class with main():

    class ExecDemo{
    // Date d = new Date();
Results 1 to 6 of 6