I am initiating a java program from unix shell script. I want to be able to get a return code another than 0 if the java program throws an exception. My first instinct is that the java program has to be re-written to throw the return code back, but I am not sure how that is done. Is my instinct right or is there another way in Uxix to get this code? Any insight would be appreciated greatly.