java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing in Intellij

前端 未结 4 1108
难免孤独
难免孤独 2021-01-17 07:12

I used Intellij Idea 12 Community edition. I am trying to create test case for my class by creating test case. When i run my test case it says

java.lang.NoC         


        
4条回答
  •  盖世英雄少女心
    2021-01-17 07:53

    add junit.jar to your project dependence. you may also need to add hamcrest.jar in addition.

    Open File->Project Structure,Click Modules->Dependences,add junit.jar.

提交回复
热议问题