JUNIT Test class in Eclipse - java.lang.ClassNotFoundException

后端 未结 26 1960
栀梦
栀梦 2020-12-14 13:55

I\'m trying to run my junit test (to verify that a properties file loads correctly) but I get ClassNotFoundException although the class is there and all requir

26条回答
  •  萌比男神i
    2020-12-14 14:42

    Yet another variation.
    Somehow, my formerly working test classes appeared to be running from some other location; my edits would not execute when I ran the tests.

    I found that the output folder for my ${project_loc}src/test/java files was not what I expected. It had inadvertently been set to ${project_loc}target/classes. I set it properly in project properties, Java Build Path, Source tab.

提交回复
热议问题