Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Using ImagePath.add("myClass/images") for accessing images in jar results in ImageMissing #304

Open
raichu2652 opened this issue Feb 7, 2018 · 1 comment
Assignees
Labels

Comments

@raichu2652
Copy link

URL url = new URL("jar:file:" + fName);

pathURL = FileManager.makeURL(jarURL.toString() + "!/" + fpSubPath, "jar");

jarURL already contains "file:" that what I see from ImagePath.get() is
"jar:file:file:C:/xxx/yyy/myartifact.jar!/images".
And it finally fails to locate the image file.

The workaround I'm using is to call ImagePath.addJar() instead of ImagePath.add().
However, the final artifact executable jar name is less consistent than the class name, so it would be great if I could call ImagePath.add() to get it worked.
Also I don't think the behavior is intended?

@RaiMan RaiMan self-assigned this Feb 7, 2018
@RaiMan RaiMan added the bug label Feb 7, 2018
@RaiMan RaiMan added this to the 1.1.2 bug fix release milestone Feb 7, 2018
@RaiMan
Copy link
Owner

RaiMan commented Feb 7, 2018

Thanks, I will check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants