引导层初始化期间发生错误 [英] Error occurred during initialization of boot layer

查看:706
本文介绍了引导层初始化期间发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照步骤创建了HelloWorld示例,但是该示例没有运行。它给出以下错误:

I followed the steps to create the HelloWorld example but it doesn't run. It gives the following error:


引导层初始化期间发生错误
java.lang.module.FindException:读取模块时出错:
F:\Develop\eclipse\HelloWorld\bin原因:
java.lang.module.InvalidModuleDescriptorException:HelloWorld.class
在顶级目录中找到(未命名的包)不允许在模块中使用)

Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: F:\Develop\eclipse\HelloWorld\bin Caused by: java.lang.module.InvalidModuleDescriptorException: HelloWorld.class found in top-level directory (unnamed package not allowed in module)"


请告知如何解决

Please advise how to solve this.

推荐答案

发生错误是因为您将jar库文件添加到MODULEPATH而不是CLASSPATH。您必须添加jar文件如果您已经将jar文件添加到MODLEPATH,则必须从其中删除并将jar文件添加到CLASSPATH,请按以下步骤操作:

The error occurs because of you add your jar library files to MODULEPATH instead of CLASSPATH. You have to add jar files to your CLASSPATH. If you already add jar files to MODLEPATH you have to remove from there and add jar files to CLASSPATH, there is the steps:

1]右键单击您在ECLIPSE IDE中的项目名称

1] Right click on your project name in ECLIPSE IDE

2]单击属性-> JAVA构建路径->单击库选项卡。您将获得如下所示的窗口:

2] Click on PROPERTIES -> JAVA BUILD PATH -> click LIBRARY tab .The you get the window like this:

3]展开MODULEPATH并选择所有jar文件并将其删除:看下面的图片:

3] Expand MODULEPATH and select all jar files and remove it :look the picture below:

4]之后,单击CLASSPATH->然后单击 ADDJAR按钮并选择jar文件,您的操作就完成了。请看下面的图片进行澄清;

4] After that click on CLASSPATH ->and click the button 'ADDJAR' and select the jar files ,your are done. Look the picture below for clarification;

5 ]在CLASSPATH中添加jar文件后,它看起来像这样:

5] After adding jars files in CLASSPATH it looks like this:

这篇关于引导层初始化期间发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆