WE are integrating testng with our application, I created testng.xml and testngbuild.xml for ant build . While running ant build it is throwing Cannot find class in classpath:. Actually I tried many ways. But I am still hopeless. Even I tried copying manually .class file to my testng directory of the application. If you can do like this, It is throwing another exception as could not load .class file
Asked
Active
Viewed 6,271 times
2
-
When asking this type of questions it helps to provide details on the ant task definition, class path and variables used in the ant task. – hidralisk Mar 28 '12 at 14:07
-
Run `ant -v` and analyze the output. – Cedric Beust Mar 28 '12 at 22:15
1 Answers
4
Even I faced the same problem many a times. You can try below solutions which worked for me.
Click on specific project ->Project->Clean-> refresh
Because of other open projects in IDE. Keep only the project you are working on open and close other non related projects. Right click-> Close Project.
And you won't believe sometimes the culprit is Excel sheet(Don't know how it is related) when you have it open and sepearate instance might have created with that etc. Close it and kll any process running with excel sheet will resolve.

j0k
- 22,600
- 28
- 79
- 90

QualityAutoTest
- 41
- 2