Intellij resources not in built artifact

前端 未结 2 945
你的背包
你的背包 2021-01-01 23:42

I\'m attempting to build a .jar that contains a non-standard images and fonts, which I have added to the resource folder in my project. I am able to load them into my projec

2条回答
  •  醉话见心
    2021-01-02 00:16

    Intellij is treating folders marked as "resources" as additional classpath directories which could be discovered by it's own autocomplete or in your case run/debug feature. Try right click on this folder and choose "Mark Directory As">"Unmark as Resources Root" to verify this assumption. If it's stopped working, you need to provide more reliable path taking into consideration where this file is located inside your resulting jar-file.

提交回复
热议问题