idea 错误: 找不到或无法加载主类 xxx.xxx.xxxxx

idea 错误: 找不到或无法加载主类 xxx.xxx.xxxxx

JDK环境,maven项目还是ee还是web项目,是否都正常。

如果是用idea打开的话,在源码目录上点击右键,然后找到Mark directory as->source root

 
看这篇:(真的是主类没找到)

    http://www.cnblogs.com/mrray1105/p/8135616.html

 
解决不了,看这篇:(project structure 中修改path为当前项目目录)

https://blog.csdn.net/qq_31382921/article/details/72898134

 
解决不了,看这篇:(idea本身缓存问题 清理缓存重启IDEA  file-->invalidate Cache/restart)

https://blog.csdn.net/lizongbao1234567890/article/details/78120851

 

还是没有解决,看这一篇:(Module must not contain source root. The root already belongs to module)

https://blog.csdn.net/angry_mills/article/details/81511130

原文地址:https://www.cnblogs.com/liuyp-ken/p/10895274.html