开发者

How do I access a JPG embedded in my JAR file via a URL object? What would be the address?

I've bundled a JPG inside of my application's JAR file. I need to access it, preferably via a URL objec开发者_Python百科t from the code in the same JAR. But I've no idea how to construct the address. I'm guessing it would be a "file:///" but what comes after that?


You can use ClassLoader.getResource, specifying a slash-delimited resource path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜