Eclipse can't find / load main class

前端 未结 20 2090
猫巷女王i
猫巷女王i 2020-12-05 04:40

My Eclipse (Indigo) was running just fine. I created a simple class Hello. It is placed in package cont in the folder ch13. However

相关标签:
20条回答
  • 2020-12-05 05:17

    I had the same problem, this is my solution:

    1. I manually deleted the bin folder of the project
    2. Then I refreshed the project which recompiled the whole project and created a new bin with all .class files

    I did it because when I performed Clean(project->clean) my .class files were not getting deleted. the above solution works for me hope its useful to others.

    0 讨论(0)
  • 2020-12-05 05:18
    • Removing the Run Configuration

      Sometimes I have a similar problems in some pre-release versions of eclipse. For fix the error, I delete the Run Configuration. You can find that in menu Run, Run Configurations...

      Then I launch the app with Alt+Shift+X, then J. If this don't work, Ctrl+F11.

    • Deleting the .metadata directory

      In another way, the configuration settings for your current workspace may are corrupted. Those settings are in the .metadata directory in your current workspace 1. In that case, there is no other choice than delete the directory:

      1. Close eclipse.
      2. Delete the .metadata directory.
      3. Start eclipse.
      4. Import the projects.
      5. Run the project again.

    Notes

    1. You will see that directory with File > Switch Workspace > Other...
    0 讨论(0)
提交回复
热议问题