How do I resolve ClassNotFoundException?

前端 未结 22 1454
后悔当初
后悔当初 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:35

    If you have moved your project to new machine or importing it from git, then try this.

    1. Right Click on class > Run as > Run Configuration
    2. remove main class reference
    3. Apply > Close
    4. Now again right click on class > run as java application.

    It worked for me.

提交回复
热议问题