title: How to manifest Main using Eclipse?
body: <p>I tried to export a runnable Jar, but it did not execute. The problem was <code>could not find main method for given launch configuration</code> However I did specify the Main class in the launch configuration. i even renamed the class that contained the main method into <code>Main</code> for this purpose</p>
  
  <p><img src="https://i.stack.imgur.com/n9Cj6.png" alt="enter image description here"></p>
  
  <p>I have specified the Main class that contains the main method, however, still the jar file did not run?</p>
  
  <hr>
  
  <p>my <code>Main</code> class</p>
  
  <pre><code>public class Main {
  
  
          static Preferences userPreferences = Preferences.userRoot();
          final static String LOGIN_KEY = "login_key";
          .....................
  
          public static void main(String [] args) {
              Runnable r = new Runnable() {
                  public void run() {
                      try {
                          createGUI();
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
                  }
  
  
              } ;
  
              javax.swing.SwingUtilities.invokeLater(r);
  
          }
  
      public static  void createGUI() throws IOException {
  
          JFrame j = new JFrame("C Manager");
          j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          ActionListener al = new ActionListener() {
              @SuppressWarnings("deprecation")
              public void actionPerformed (ActionEvent e ) {
          ......................
  
      }
  
  
  
  }
  </code></pre>