How do I resolve ClassNotFoundException?

前端 未结 22 1494
后悔当初
后悔当初 2020-11-21 06:06

I am trying to run a Java application, but getting this error:

java.lang.ClassNotFoundException:

After the colon comes the location of the cla

22条回答
  •  忘了有多久
    2020-11-21 06:23

    Try these if you use maven. I use maven for my project and when I do mvn clean install and try to run a program it throws the exception. So, I clean the project and run it again and it works for me.

    I use eclipse IDE.

    For Class Not Found Exception when running Junit test, try running mvn clean test once. It will compile all the test classes.

提交回复
热议问题