What would be the best way to pass a return code from a Java app back to a calling Unix korn shell script?
I have a small basic Java app that reads a flat file, processes the file then writes good and bad output files. In the Java app I am catching IOExceptions and logging them.
If a file is not found I am catching that error but I also need to pass to the calling shell script a return code that indicates that the Java app finished processing with an exception. How should I pass a negative/exception generated return code back to the shell script? Currently the return code the Unix script (if [ $rcode -ne 0 ]) is getting is 0 regardless if there is an IOException or not.