Results 1 to 3 of 3

Thread: shell exit code

  1. #1
    mac's Avatar
    mac
    mac is offline Member
    Join Date
    Dec 2009
    Location
    St. Petersburg, Russia
    Posts
    81
    Rep Power
    0

    Default shell exit code

    Good evening everyone,

    Could you suggest how might i pick up a ksh exit code in Java?

    Thanks,
    mac

  2. #2
    iluxa is offline Senior Member
    Join Date
    Mar 2010
    Posts
    266
    Rep Power
    5

    Default

    Java Code:
    Process p = System.getRuntime.exec("/path/to/the/process");
    System.out.println("exit value=" + p.exitValue());

  3. #3
    mac's Avatar
    mac
    mac is offline Member
    Join Date
    Dec 2009
    Location
    St. Petersburg, Russia
    Posts
    81
    Rep Power
    0

Similar Threads

  1. How to exit the program by typing "exit"?
    By Laythe in forum New To Java
    Replies: 6
    Last Post: 08-19-2009, 08:32 PM
  2. Process exit value = 128
    By trivektor in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-19-2008, 08:11 AM
  3. JVM terminated Exit code=1
    By oregon in forum Eclipse
    Replies: 3
    Last Post: 09-29-2008, 09:49 PM
  4. [SOLVED] exit code 2
    By antgaudi in forum New To Java
    Replies: 2
    Last Post: 09-21-2008, 10:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •