Java & Eclipse: Resources in JAR?

前端 未结 1 1938
忘了有多久
忘了有多久 2021-01-22 15:34

How can I add resources (images) directly into my JAR file? For example, if you open the minecraft.jar (of Minecraft) you can see a few classes and folders with resources.

相关标签:
1条回答
  • 2021-01-22 16:08

    You can just create a new folder and mark it as source folder (rightclick on folder in Eclipse -> Build Path -> Use as source folder). Now you should be able to use the ressources without them being in the /src folder.

    0 讨论(0)
提交回复
热议问题