Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Catch Java exception in MS-DOS Batch File

807605Jun 12 2007 — edited Jun 12 2007
Hello,

I am new to java programming. I have written a program which reads a file and create multiple files based on certain condition. I am executing my java executable from a MS-DOS Batch file.

I have a situation whereby I want to move these newly created file to a new folder/directory by executing the MS-DOS command in the batch file.

Now the issue is I want to be sure if the java class has been executed successfully then only I want to execute the subsequent command in the Batch file. Is there a way to catch the program exception in the MS-DOS Batch file and based on the exit code execute the next command in the Batch file.

Any help is much appreciated.

Best Reagrds
pastha
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2007
Added on Jun 12 2007
3 comments
1,205 views