title: getDeclaredMethod keeps giving NoSuchMethodException
body: <p>I have seen some posts about the NoSuchMethodException with getDeclaredMethod but I still can't get rid of the problem.</p>
  
  <p>I isolated the problem to a bare bones, can someone make this working: </p>
  
  <pre><code>public class MainMethodTest {
  
      public static void main(String[] args) {
  
          try {
              //Method m = MainMethodTest.class.getDeclaredMethod("main");
              Method m = MainMethodTest.class.getDeclaredMethod("main", MainMethodTest.class);
          } catch (NoSuchMethodException e) {
              e.printStackTrace();
          }
      }
  
  }
  </code></pre>