Suppose I am 2 jar file and need to run them from shell script, i can use the below commands in the same script.
java -jar myApp1.jar
java -jar myApp2.jar
So it will start myApp1.jar first and then myApp2.jar file.
Question: I want to run myApp2.jar only if the run of myApp1.jar is successful/completed. If myApp1.jar run is failed it will exit the shell script.
Can any one please help me how can I achieve that?