System.exit() doesn't return actual code

Discussion in 'Java' started by Eyal Bekerman, Sep 29, 2003.

  1. Hello,

    I have a java application which uses Runtime.exec() to execute another
    java application.
    The child java application returns 18 on success and 19 on failure.
    It works fine most of the times but at some computers it fails
    occasionally, returning 0 to the parent application.
    The last line in the main() method is System.exit()

    What am I doing wrong?
     
    Eyal Bekerman, Sep 29, 2003
    #1
    1. Advertising

  2. Eyal Bekerman

    Roedy Green Guest

    On 29 Sep 2003 07:31:30 -0700, (Eyal Bekerman)
    wrote or quoted :

    >The child java application returns 18 on success and 19 on failure.
    >It works fine most of the times but at some computers it fails
    >occasionally, returning 0 to the parent application.
    >The last line in the main() method is System.exit()


    I have seen strange numbers returned as well. There may be a bug to
    track down.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Sep 29, 2003
    #2
    1. Advertising

  3. Eyal Bekerman

    Steven Coco Guest

    Eyal Bekerman wrote:
    > Hello,
    >
    > I have a java application which uses Runtime.exec() to execute another
    > java application.
    > The child java application returns 18 on success and 19 on failure.
    > It works fine most of the times but at some computers it fails
    > occasionally, returning 0 to the parent application.
    > The last line in the main() method is System.exit()
    >
    > What am I doing wrong?


    Does your application create any threads?

    --

    ..Steven Coco.
    .........................................................................
    When you're not sure:
    "Confess your heart" says the Lord, "and you'll be freed."
     
    Steven Coco, Oct 10, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FuZHk=?=

    Code to Exit Web App and Exit Internet Explorer

    =?Utf-8?B?U2FuZHk=?=, Aug 3, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    7,929
    =?Utf-8?B?U2FuZHk=?=
    Aug 5, 2005
  2. QQ
    Replies:
    5
    Views:
    535
    Jonathan Adams
    May 10, 2005
  3. jacob navia
    Replies:
    3
    Views:
    568
    Nick Keighley
    Feb 24, 2010
  4. Keith Thompson
    Replies:
    10
    Views:
    709
    Tim Rentsch
    Mar 3, 2010
  5. chad
    Replies:
    14
    Views:
    591
    Arnaud Delobelle
    Oct 13, 2010
Loading...

Share This Page