title: Exception in thread "main" java.lang.NoClassDefFoundError: wrong name
body: <p>My file directory:</p>
  
  <pre><code>project/src/m2mcom/entities/AutomatedTelnetClient.java
             /web/Simple.java           
             /org/apache/commons/net/telnet/TelnetClient.java 
  </code></pre>
  
  <p>The source code of the Simple.java:</p>
  
  <pre><code>package m2mcom.web;
  import m2mcom.entities.AutomatedTelnetClient;
  import java.util.*;
  import java.io.*;
  
  public class Simple {
      public static void main(String [] args) {
          try {
              AutomatedTelnetClient telnet = new AutomatedTelnetClient();
              String answer = telnet.request();
              System.out.println(answer);
          } catch (Exception e) {
              System.err.println("Error");
          }
      }
  }
  </code></pre>
  
  <p>And when I execute Simple.class, without any errors of compilation, I get this error message:</p>
  
  <pre><code>C:\Users\Victor\Desktop\project2\src\m2mcom\web&gt;java Simple
  Exception in thread "main" java.lang.NoClassDefFoundError: Simple (wrong name: m
  2mcom/web/Simple)
  </code></pre>
  
  <p>Does anyone know how to solve this?  </p>