简体   繁体   English

导出的Jar文件无法读取纹理文件

[英]Exported Jar file doesn't read the texture files

OK, so I've worked upon a Java flappy bird game, the game works fine in the editor it reads all of the textures but when i export it to a .jar file it won't read the textures. 好的,因此我研究了Java拍打鸟游戏,该游戏在编辑器中运行良好,可以读取所有纹理,但是当我将其导出到.jar文件时,它将不会读取纹理。

在此处输入图片说明

Thats what it looks like when i launch the game and that's the layout of the .jar file. 那就是我启动游戏时的样子,那就是.jar文件的布局。

在此处输入图片说明

That's how the Eclipse one is set out, I've tried putting the assets folder in the net folder, the dragon4c3 folder the game folder but it still doesn't read the textures, is there something i need to do when exporting the .jar file? 这就是Eclipse的设置方式,我尝试将资产文件夹放在net文件夹中,把dragon4c3文件夹放在game文件夹中,但是它仍然不读取纹理,在导出.jar时我需要做些什么文件? It does work but you need to have the assets folder in the same folder as the .jar file. 它确实可以工作,但是您需要将Assets文件夹与.jar文件放在同一文件夹中。 Is that the only way of doing it? 这是唯一的方法吗?

have you selected "Export all output folders for checked projects"? 您是否选择了“为检查的项目导出所有输出文件夹”?

image here 图片在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM