title: How can Eclipse create a class with unresolved compilation problems?
body: <p>When I try to compile this class with javac, I get a compilation error and Test.class is not created.</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) {
          int x = 1L;  // &lt;- this cannot compile
      }
  }
  </code></pre>
  
  <p>But when I create this class in Eclipse, I can see that Test.class appears in target/classes. When I try to run this class from command line with java.exe, I get </p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.Error: Unresolved compilation problem: <br/>
          Type mismatch: cannot convert from long to int</p>
  </blockquote>
  
  <p>Does Eclipse use its own special Java compiler to create a broken .class? How does java.exe know about complilation problems in .class?</p>