title: "The project: swing which is referenced by the classpath, does not exist" in Eclipse when project name is the same as workspace name
body: <p>I am new to swing development using eclipse but I have been using eclipse for my java code development for more than a year. Today when I wrote a sample swing class got a curious error from eclipse.</p>
  
  <p>I created a workspace swing , and created a new project in the same name as the workspace. Then wrote a sample class inside the project, please find the code below.</p>
  
  <pre><code>import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.SwingUtilities;
  
  
  public class SwingDemo {
  
      public SwingDemo() {
          // TODO Auto-generated constructor stub
          JFrame jFrame = new JFrame("A sample swing application");
          jFrame.setSize(275, 100);
  
          jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          JLabel jLabel = new JLabel("Welcome to swing!!!!");
          jFrame.add(jLabel);
  
          jFrame.setVisible(true);
      }
  
      /**
       * @param args
       */
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          SwingUtilities.invokeLater(new Runnable() {
  
              @Override
              public void run() {
                  // TODO Auto-generated method stub
                  new SwingDemo();
              }
          });
  
      }
  
  }
  </code></pre>
  
  <p>When I tried to execute it in eclipse ,resulted in the below error</p>
  
  <p>The project: swing which is referenced by the classpath, does not exist.</p>
  
  <p>The same code was executed fine, when the project name and workspace name were differrent.</p>
  
  <p>I am just curious, what caused this error. Please help</p>