How to get the exit status of a Java program in Windows batch file

Posted by pugmarx on Stack Overflow See other posts from Stack Overflow or by pugmarx
Published on 2009-05-20T09:37:25Z Indexed on 2010/03/21 7:01 UTC
Read the original article Hit count: 511

Filed under:
|
|
|

Analogous to the $? in Linux, is there a way to get the exit status of a program in a Windows batch file (.bat)?
Say for example the program has a System.exit(0) upon successful execution, and a System.exit(1) upon a failure, how do I trap these exit values in a .bat file?

© Stack Overflow or respective owner

Related posts about java

Related posts about Windows