I have 3 jar files A.jar, B.jar, C.jar. C.jar contains a class com.rb.test.PResolver.java having main method. C.jar has dependency on A.jar and B.jar. When I try to run PResolver class using following command, the main method gets invoked, but it fails, since the dependent jar files are not in classpath:
java -cp C.jar com.rb.test.PResolver
When I try to add the dependent jar filed in -CP option, then the class is not found:
java -cp A.jar:B.jar:C.jar com.rb.test.PResolver
Above command gives following error:
Error: Could not find or load main class com.rb.test.PResolver
So the moment I put the dependent jars in the -cp option of java command, the class is not found.