java - 我怎样才能在 eclipse 中显示图像?

标签 java linux eclipse image imageicon

<分区>

需要帮助,我在 linux 上使用 eclipse,当我运行它时,我有一个代码 java MineSweeper Game
enter image description here

即使代码没有错误,矩阵中的图像也不会显示,&同样的代码在另一台机器上运行完美 enter image description here

第张图片在文件夹中

enter image description here

& 在代码中调用

enter image description here

我试过用intellij运行,结果一样,没有图像

最佳答案

您的屏幕截图中没有 Drapeau.PNG。所以这可能是问题所在。 但更有可能的是,问题是您的文件名似乎实际上以 .png 结尾,而不是 .PNG。 Linux 文件系统区分大小写。

关于java - 我怎样才能在 eclipse 中显示图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53578915/

相关文章:

java - 如何使用 springfox 绕过 Swagger UI 中的授权

regex - journalctl使用正则表达式搜索元数据

linux - 如何在类 Linux 操作系统上自动执行安装过程?

c# - 识别一组点中的矩阵

java - 谷歌应用引擎: Web XML not handled the same way online or offline

c - 通过 C 中的文件使用 crypt 函数进行身份验证(段错误)

eclipse - 有没有办法让 Eclipse (JDT) 中的内容辅助在我输入 "new"后自动显示?

eclipse - Spring Security ACL域错误: The type xxx is already defined

java - 如何根据 Eclipse 中的字段注释自动为 getter/setter 生成注释?

java - 对象类型的 JAXB 属性抛出空指针异常?