title: Issue with main when running jar file
body: <p>I am trying to run a jar file, and I have created the manifest file and such within eclipse and specified the main entry point. I have tested all my class files and the one I need to work(TestRead.java) keeps giving me this error am not sure why or how to resolve it:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchemaElement
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.getMethod0(Unknown Source)
      at java.lang.Class.getMethod(Unknown Source)
      at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
      at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: org.apache.ws.commons.schema.XmlSchemaElement
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
          ... 6 more
  </code></pre>
  
  <p>And below is the command line:</p>
  
  <pre><code>java -jar JavaWdslApp.jar
  </code></pre>
  
  <p>Edit: I saved it as a runnable Jar file for the mean time and tried running it but another issue appears telling me the array is out of bounds: <code>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0</code></p>
  
  <p>This is how I call it:</p>
  
  <pre><code>public static void main(String[] args) {
  String path1 = args[0];
  String fileName = args[1];
  TagDef tagDef;
  
  String[] operations;
  try {
      operations = listOperationsUnique("abc");
      System.out.println("operation:" + operations.length);
      for (int i = 0; i &lt; operations.length; i++) {
          System.out.println("operation:" + operations[i]);
      }
  } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  
  try {
      tagDef = refheader(path1, fileName); 
  
      System.out.println("=================================================================");
      System.out.println("abc");
      System.out.println(abc);
      System.out.println("=================================================================");
  
  } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  
  }
  </code></pre>