I'm trying to run testng via command line and I used following command: Actually my os is linux ubuntu and i used command: java -cp "lib/*:bin" org.testng.TestNG testng.xml
1 Answers
0
votes
It is pretty clear what the problem is. The class that the error message is complaining about is not on your classpath ... just like it says.
Either you have got your classpath incorrect (e.g. what comes after the -cp) or you have got the name of the class incorrect. (I expect that needs to be a fully quaklified classname ... and maybe you've given something different.)
On possibility is that the shell is "globbing" the * in the classpath. Try running echo "lib/*:bin". If it doesn't echo lib/*:bin then you need to escape the * to stop the shell expanding it. However, the double-quotes ought to suppress globbing, so I doubt that this is the problem.