That depends on what "successful" means. Do you want to check the return code of your Java program in a command line script?
Make the Java program exit by using the System.exit(returncode) method. This allows you to pass a return code to the script, which you can check there.
Next time, please use a better topic title than just "Doubt"... [ May 11, 2006: Message edited by: Jesper Young ]