Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

traping compilation errors in batch file

  Asked By: Richard    Date: Jul 14    Category: Java    Views: 843
  

Could you please help me in trapping java compilation errors in my
batch file. I want to create a jar file containing all my class if
and only if they compile successfully.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Ana Bradley     Answered On: Jul 14
 
Answer #2    Answered By: Bernard Gutierrez     Answered On: Jul 14

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.

 
Didn't find what you were looking for? Find more on traping compilation errors in batch file Or get search suggestion and latest updates.




Tagged: