I have a jar with two main class. I'm trying to run the main class using the command
java -cp TestNGExamples-0.0.1-SNAPSHOT.jar:lib/* com.test.integration.TestMain
but I get the following error
Error: Could not find or load main class com.test.integration.TestMain
I don't want to edit the manifest file since I already have a Main class given there. lib folder is there in the jar and I've checked it.
Can anyone tell me what I'm doing wrong here?
Edit:
This was my referral : Run a JAR file from the command line and specify classpath