title: javac show error without warnings
body: <p>I'm using Sun's javac 1.6.0_26. I invoke it like this:</p>
  
  <pre><code>javac -Xlint -encoding UTF-8 
  </code></pre>
  
  <p>and usually if there are errors only them are displayed. However this code</p>
  
  <pre><code>class Test{
      public static void main(String args[]) {
          java.util.Date d = new java.util.Date();
          system.out.println(d.getDate());
      }
  </code></pre>
  
  <p>produces both warning and error:</p>
  
  <pre><code>java:5: warning: [deprecation] getDate() in java.util.Date has been deprecated
          system.out.println(d.getDate());
                              ^
  java:5: package system does not exist
          system.out.println(d.getDate());
  </code></pre>
  
  <p>So my question is: how do I make javac show only errors (without warnins) when there are any and all warnings when there are no errors (never both)?</p>