|
Robert Upshall wrote:
I have a 3rd party java program that I want to run with the RUNJVA command. It is possible for that program to end with System.exit(0), System.exit(1), System.exit(2) or System.exit(3).
I want to be able to tell if it was in fact 0,1,2 or 3. Will monitoring for JVA0122 tell me that?
You'll have to interrogate the message data ... but, yes, it will.
For example:
I wrote this quick & dirty program ...
public class TestExit {
public static void main(String[] args) {
String _code = args[0];
int code = Integer.parseInt(_code);
System.exit(code);
}
}
And ran it with the following command: RUNJVA CLASS(TestExit) PARM(10) CLASSPATH('/home/devdmg')
After it completed, JVA0122 was in the job log with this text: 'Java program completed with exit code 10'.
The return code will be in the message data as the first parameter, formatted as binary.
david
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.