Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > System.exit() doesn't return actual code

Reply
Thread Tools

System.exit() doesn't return actual code

 
 
Eyal Bekerman
Guest
Posts: n/a
 
      09-29-2003
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?
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      09-29-2003
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.
 
Reply With Quote
 
 
 
 
Steven Coco
Guest
Posts: n/a
 
      10-10-2003
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."

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return actual files only not directories, using Pathname.. Brian Wallace Ruby 5 02-05-2009 03:04 PM
Enumerable#select used to return actual values Mike Austin Ruby 20 12-04-2008 04:47 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM
Optimization - any idea of actual machine code? Russell Wallace Java 7 06-11-2004 08:53 AM
How do I return a return-code from main? wl Java 2 03-05-2004 05:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57