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

后端 未结 3 2070
借酒劲吻你
借酒劲吻你 2021-02-20 04:12

I recently installed intellij IDEA 14.0 and to make sure everything was working I created a simple Hello World program. I do not understand why the output is not correct and why

相关标签:
3条回答
  • 2021-02-20 04:57

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

    0 讨论(0)
  • 2021-02-20 05:17

    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.

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题