我在Linux Mint和Git上使用Apache Netbeans 9.0。我有一个名为 PowerCal 的java项目,在尝试运行它时,我收到以下错误:
run:
Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: /<PATHTOMYPROJECT>/PorwerCal/build/classes
Caused by: java.lang.module.InvalidModuleDescriptorException: Truncated module-info.class
/home/<myusername>/.cache/netbeans/9.0/executor-snippets/run.xml:111: The following error occurred while executing this line:
/home/<myusername>/.cache/netbeans/9.0/executor-snippets/run.xml:68: Java returned: 1
BUILD FAILED (total time: 0 seconds)
我不知道为什么会发生这种情况,我以前运行这个项目没有任何问题,但后来我开始创建一些类,之后我不能再运行它。所以我把项目回滚到开始,到它工作的点,但现在它不工作了。
1条答案
按热度按时间56lgkhnf1#
解决办法是:
您使用的是哪个版本的Java?Java 10中有一个InvalidModuleDescriptorException的修复程序,不过很明显,这不一定与您的问题有关。正如前面的评论中所建议的,只需选择项目节点,右键单击并选择Clean and Build。这样就修复了问题吗?- skomisa