JUNIT Test class in Eclipse - java.lang.ClassNotFoundException

后端 未结 26 2032
栀梦
栀梦 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条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 14:27

    I too faced the same exception, none of the solutions over internet helped me out. my project contains multiple modules. My Junit code resides in Web module. And it's referring to client module's code.

    Finally , I tried : Right click on (Web module) project -->build path--> source tab--> Link source --> added the src files location (Client module's)

    Thats it! It worked like a charm Hope it helps

提交回复
热议问题