javac returning incorrect error code with annotation processor
<p>When you run javac with a annotation processor and a corrupted jar in your classpath java errors out but returns 0 as the error code(0 means it ran without any errors). If you run the same command without the annotation processor it returns 1 as the error code. So adding a annotationProcessor takes away the error code. </p>

<p>below is some example output:</p>

<pre><code> running compile with a corrupted jar
 error: error reading corruptedJar.jar; error in opening zip file
 Using Test AnnotationProcessor
 Error level 0
 running compile without the corrupted jar
 Using Test AnnotationProcessor
 Error level 0
 running compile without the annotationProcessor but with the corrupted jar
 error: error reading corruptedJar.jar; error in opening zip file
 1 error
 Error level 1
</code></pre>

<p>the bat file i used to run the above out put is</p>

<pre><code> @echo off
 echo running compile with a corrupted jar
 javac -cp annotationProcessor.jar;corruptedJar.jar HelloWorld.java
 echo Error level %errorlevel%
 echo running compile without the corrupted jar
 javac -cp annotationProcessor.jar HelloWorld.java
 echo Error level %errorlevel%
 echo running compile without the annotationProcessor but with the corrupted jar
 javac -cp corruptedJar.jar HelloWorld.java
 echo Error level %errorlevel%
</code></pre>

<p>Am I missing a parameter or is this a bug inside javac that is returning a incorrect error level?</p>

<p>edit..</p>

<p>source code for everything <a href="https://gist.github.com/ludjer/570708438dbcb3f08106" rel="nofollow">https://gist.github.com/ludjer/570708438dbcb3f08106</a> </p>

<p>the annotationProcessor.jar has one class in it called AnnotationProcessor</p>

<p>the corruptedJar.jar is a corrupted zip file(technically could be any non zip file for the test mine was a text file with a renamed extension)</p>