Exception in thread “main” java.lang.ClassNotFoundException:

不羁岁月 提交于 2019-12-04 01:16:16

The reason you're getting this error is because you didn't save the class into a file called Hello.java (case-sensitive!)

ankit

This is just problem of intellij IDE.

Solution Steps:

  1. CtrlShiftAlts -> Preject Setting -> modules tab -> expand <project_name> and go to <project_name>_main
  2. refer Image:

  3. In Sources tab -> ** click on x symbol**

  1. click YES
  2. Right click on

    -> sources
  3. Apply and OK

Finally build your project.

Enjoy.

It usually happens with IntelliJ.

I solved it deleting all modules and only leaving which have more hierarchy

The other modules(like main or test) are already part of product

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!