This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

eclipse: Junit ClassNotFoundException  RSS feed

m pa
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Struts 2 project with JUnit4 in eclipse Juno.

I want to run a test in one of my action classes. I use the @Test annotation for the method I want to test. So far so good.

To run the test, I right click on the action class, select Run as -> JUnit Test.

Now it appears that the build.xml, which compliles all classes, is used but once build finishes, some classes are not in the build folder so I get the ClassNotFoundException. (the console is cleared before the exception is displayed so difficult to capture see what happened).

I have 3 action classes but only 1 has .class file in the build folder. (obviously this is not the one that I want to JUnit test)

Using Project -> Clean will result in all .class files being in the build folder.

Why is Run Junit test using build.xml and why are some classes getting cleared?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!