Using the Fault Analyzer Java wrapper utility
Fault Analyzer Java wrapper utility wraps a callable Java application in a try-catch block by using the FA Java class.
The try-catch block traps any unhandled exceptions from the Java™ application and calls Fault Analyzer using the com.ibm.faultanalyzer.Snap.dump method.
Usage
Copy the IDIXJAVA jar file as binary to an HFS or zFS directory:
//* --- Copy IDIXJAVA to an HFS or zFS directory:
//CPYXJAVA EXEC PGM=BPXBATCH
//STDPARM DD *
SH cp "//'IDI.SIDIDOC1(IDIXJAVA)'" /u/hunter2/idixjava.jar
/*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
Invoking the Fault Analyzer wrapper
You can call the wrapper utility through the command line or as part of a batch job (JCL).
Use either of the following commands to invoke the wrapper utility from a command line application:
-
java -jar idixjava.jar <clsName> <mainArgs>
or
-
java -cp idixjava.jar FA <clsName> <mainArgs>
For a Java™ batch application that is invoked using BPXBATCH:
//* --- Launch a batch Java application with
//* --- Fault Analyzer wrapper
// EXPORT SYMLIST=*
// SET HFSDIR=<target directory>
//CPYXJAVA EXEC PGM=BPXBATCH
//STDENV DD *
JAVA_HOME=/usr/lpp/java800/31bit/J8.0/ &&
PATH=${PATH}:${JAVA_HOME}/bin
CLASSPATH=/u/hunter2/classes
/*
//STDPARM DD *
SH java -jar /u/hunter2/idixjava JavaApp arg1 arg2
/*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
Fault Analyzer passes the specified arguments to the main method of the user application. Any specified Java™ properties and environment variables are available to the user application as normal.
When an unhandled exception occurs, the resulting fault entry contains information about the Java™ event.