← Back to team overview

sikuli-driver team mailing list archive

[Question #280740]: Multiple ImagePaths for Jar

 

New question #280740 on Sikuli:
https://answers.launchpad.net/sikuli/+question/280740

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
(The altPaths work fine when running from Eclipse.)

Could I please ask for your advice on this?


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.