Results 1 to 3 of 3
- 07-19-2011, 09:35 PM #1
Member
- Join Date
- Jul 2011
- Location
- New Delhi,India
- Posts
- 56
- Rep Power
- 0
Java Result:-1....on calling exit
i wrote the following code-
package javalang;
public class SystemClass {
public static void main(String[] args) {
//System.out.println("time:"+System.currentTimeMilli s());
//System.exit(1);
Runtime.getRuntime().exit(-1);
System.out.println("hello");
}
}
and the o/p was-
Java Result:-1
i know that passing 0 as input means successful termination of program and any other argument means some sort of abnormal termination.....but
my question is what does Java Result:-1 means????
- 07-19-2011, 10:00 PM #2
The meaning is what the caller of the program agrees that it should mean.what does Java Result:-1 mean
The OS can have a set of return codes that have a meaning. The program will return one of them depending on what it wants to tell the OS. Some batch/script file/executors can read the code returned by a program and use it to control their processing
A company I worked for in San Francisco had -1906 as an error code meaning the program had a terrific error.
(1906 was the year of the fire)Last edited by Norm; 07-19-2011 at 10:03 PM.
- 07-19-2011, 10:15 PM #3
Member
- Join Date
- Jul 2011
- Location
- New Delhi,India
- Posts
- 56
- Rep Power
- 0
Similar Threads
-
Struts 2 error : No result defined for action / result
By sameerk in forum Web FrameworksReplies: 1Last Post: 05-17-2011, 10:15 AM -
I code a binary division in java, but the result is not desirable.
By amityadav9314 in forum New To JavaReplies: 1Last Post: 03-09-2011, 03:45 PM -
New To Java - Input Number Won't Prompt, Wrong Result
By jhuwalker in forum New To JavaReplies: 2Last Post: 01-31-2011, 10:29 PM -
Java Result: 255
By MadJack in forum New To JavaReplies: 14Last Post: 11-11-2010, 08:54 AM -
How to exit the program by typing "exit"?
By Laythe in forum New To JavaReplies: 6Last Post: 08-19-2009, 08:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks