Multiple ImagePaths for Jar

Asked by Revarye

I have images in different folders, e.g.
folder1
--- 1.png

folder2
--- 2.png

This works for running from Eclipse:
ImagePath.add("src/main/resources/package/images/folder1");
ImagePath.add("src/main/resources/package/images/folder2");
SikuliX is able to detect the correct folder for each image.

However, when I switch to a jar run:
ImagePath.add(Test.class.getName() + "/package/images/folder1", "src/main/resources");
ImagePath.add(Test.class.getName() + "/package/images/folder2", "src/main/resources");

SikuliX only looks in the first folder I add:
[error] Image: could not be loaded: jar:file:/D:/path/target/my.jar!/package/images/folder1/2.png
So the folder1 images can be loaded, but the folder2 images can't. The altPaths work fine when running from Eclipse though.

Could I please ask for your advice on this?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

I made it a bug and will check it.

Revision history for this message
Revarye (revarye) said :
#2

Thank you RaiMan :)