How to execute a class in a subdirectory in .jar file
I have a jar file "My.jar".
In this "My.jar" file, I have a directory "build\classes".
In this "build\classes" directory, I have a package "package1.sub1".
In this "package1.sub1", I have class files "MyClassA.class", "MyClassB.class", etc. (package package1.sub1 is declared in all of these classes.)
Now, I want to execute "package1.sub1.MyClassA.class" in "build\classes" directory of "My.jar" from the command line. How can I do that?
I tried "java -cp My.jar build\classes\package1.sub1.MyClassA.class", but it was not successful. Please help me.
Thank you very much.