必须声明一个命名包eclipse,因为此编译单元与命名模块相关联 [英] must declare a named package eclipse because this compilation unit is associated to the named module

查看:1575
本文介绍了必须声明一个命名包eclipse,因为此编译单元与命名模块相关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我刚刚下载了eclipse for Java,但是当我尝试制作我的第一个程序时,我不断收到此错误:

I just downloaded eclipse for Java Yesterday but when I was trying to get make my first program, I kept on getting this error:

must declare a named package eclipse because this compilation unit is associated to the named module x. 

我该如何解决?

推荐答案

只需在项目资源管理器选项卡中删除 module-info.java

Just delete module-info.java at your Project Explorer tab.

这篇关于必须声明一个命名包eclipse,因为此编译单元与命名模块相关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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