java - Issue with main when running jar file -


I am trying to run a jar file, and I have created the manifest file and specify the main entry point such as eclipse Have done I have tested all my class files and I need to work (TestRead.java) to tell me this error why it is not sure how to resolve it or:

  Exception in thread "main" Java.lang.NoclassDefFoundError: org / apache / ws / commons / schema / xmlSchemaElement on java.lang.Class.getDeclaredMethods0 (Basic method) java.lang.Class.privateGetDeclaredMethods (unknown source) java.lang Sun.launcher.LauncherHelper.validateMainClass on (unknown source) at .class.getMethod0 on sun.laun java.lang.Class.getMethod (unknown source) Reason by cher.LauncherHelper.checkAndLoadMain (unknown source): java.lang.ClassNotFoundException: classguy ($ 1) RUR (unknown source) at org Java.net.URL Java class loader $ 1.run (Unknown Source) on java.security.AccessController.doPrivileged (Basic method) on Java. Sun.URLClassLoader.findClass (unknown source) at java.lang.ClassLoader.loadClass (unknown source) at sun.misc.Launcher $ AppClassLoader.loadClass (Unkn) on Java.lang.ClassLoader.loadClass (unknown source) ... 6 More   

and below is the command line:

  java - jar JavaWdslApp.jar   

Edit: I Saved time as a runner jar file and tried to run it but another issue is telling me that the array is out of range: exception thread "main" java.lang.ArrayIndexOutOfBoundsException: 0

In this way I call it Ta do:

  public static void main (String [] args) {String path 1 = Arges [0]; String filename = args [1]; TagDef tag def; String [] operation; Try {operations = listOperactionsUnique ("abc"); System.out.println ("Operation:" + operations.length); For (Int i = 0; I & lt; Operation. Lamper; I ++) {System.out.println ("Operation:" + Operation [i]); }} Hold (FileNotFoundException E) {// TODO auto generated blocking block e.printStackTrace (); } Grip (SAXException E) {// TODO Automatic generated block e.printStackTrace (); } Grip (IOException E) {// TODO Auto-Generated Catch Block e.printStackTrace (); } Hold (parser configuration exception e) {// Todo auto-generated catch block e.printStackTrace (); } {Try TagDef = refheader (path 1, filename); Println ("=============================================== ================== "); Println ("ABC"); Println (ABC); Println ("=============================================== ================== "); } Grip (Exception E) {// TODO Auto generated blocking block e.printStackTrace (); }    

causes another error because you try to reach Arg [0] And arguments, while you have not given any argument on your command line, it should look like this:

  Java- Java JavaWdslApp.jar value forPath1 valueForFileName   

I recommend you to check.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -