u can create another shell script to handle your main shell script output. This
shell script
will get the input and search for successfull messsage in order to validate your
compilation script. By the result of validation set an environment variable 1 or
0.
and your main script will check this flag and decide for the next action: make
jar or not.
Just pipe your javac command output to the control script. i know that this is
possible
but i havent write once yet.