Class Not Found Exception when running JUnit test

前端 未结 25 881
夕颜
夕颜 2020-12-07 08:32

I am getting this error when running JUnit test in Eclipse:

Class not found com.myproject.server.MyTest
java.lang.ClassNotFoundException: com.myproject.serve         


        
25条回答
  •  时光说笑
    2020-12-07 09:20

    I had faced the same issue. I solved it by removing the external JUnit jar dependency which I added by download from the internet externally. But then I went to project->properties->build path->add library->junit->choosed the version(ex junit4)->apply.

    It automatically added the dependency. it solved my issue.

提交回复
热议问题