title: Why eclipse compiles a file that shell javac or mvn produces an error: code too large?
body: <p><strong>Environment:</strong></p>
  
  <ul>
  <li>Eclipse luna</li>
  <li>maven 3.2.3</li>
  <li>java 7</li>
  </ul>
  
  <p>I've seen <a href="https://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java">questions</a> like this but what I don't understand is why eclipse can compile this file and we aren't able to do it through the shell.</p>
  
  <p>I also know that this file it would have to be a properties file but it is what I found in a project.</p>
  
  <p>Eclipse compiles de file and create the bytecode Messeges.class, but neither javac nor mvn could do that because the error: code too large. </p>
  
  <p>This file Messages.java is an enum that has 3232 lines and is used as a properties to load al this in memory. It has about 3100 different elements.</p>
  
  <p><strong>Messages.java</strong></p>
  
  <pre><code>public enum Messages {
    MENU_MANAGEMENT("Management menu"),
    ...3100..
    MENU_OTHER("Other");
  
    private String name;
  
    private Messages(String name) {
      this.name = name;
    }
    ...
  }
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>$javac Messages.java
  Messages.java:11: error: code too large
          MENU_MANAGEMENT("Management menu"),
          ^
  1 error
  </code></pre>
  
  <p><strong>How or why is eclipse compiling this? I can not understand how eclipse can do that ¿?</strong></p>