I'm currently using linux and i have to run a command in the form
java -cp .:../jarfile.jar doc.DocDump <file>
suppose currently that i'm in folder /home/noor/downloads/commands/commandDump. Suppose, I need to run the command from anywhere, I'm trying the command below but its not running.
suppose that i'm currently in home
java -cp .:/home/noor/downloads/commands/commandDump/../jarfile.jar doc.DocDump
the "commands" folder contain the jarfile.jar and also contain a folder "command" which then contain a folder "doc" which then contain the class "DocDump"
I'm getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: Doc/DocDump
Caused by: java.lang.ClassNotFoundException: Doc.DocDump
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: doc.DocDump. Program will exit.