I am getting “could not find or load main class” error even though i am setting the class path correctly.
Here is my directory structure:
src\org\apache\ws\axis2
Inside axis2 directory, i have my Client.class file.
Now, to run the Client class file, i gave the following command from src directory
java -cp "C:\Documents and Settings\F1QBWFA\My Documents\Downloads\temp\src\org\apache\ws\axis2" org\apache\ws\axis2\Client
I tried this as well:
java -cp "C:\Documents and Settings\F1QBWFA\My Documents\Downloads\temp\src\org\apache\ws\axis2" org.apache.ws.axis2.Client
And i get the same error. What am i doing wrong here?
Shouldn’t it be
Class path should refer to the root of your package structure, not to the specific folder of the inner package. Of course I’m assuming you have
package org.apache.ws.axis2;at the beginning ofClient.java