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

Posted by dacracot on Stack Overflow See other posts from Stack Overflow or by dacracot
Published on 2010-04-30T03:06:45Z Indexed on 2010/04/30 3:07 UTC
Read the original article Hit count: 370

Filed under:
|
|

I've bundled a JPG inside of my application's JAR file. I need to access it, preferably via a URL object 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?

© Stack Overflow or respective owner

Related posts about java

Related posts about jar