← Back to team overview

sikuli-driver team mailing list archive

[Bug 1532134] [NEW] [1.1.0] Multiple ImagePaths for Jar not working

 

Public bug reported:

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?

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: Opinion

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
       Status: In Progress => Opinion

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.1

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1532134

Title:
  [1.1.0] Multiple ImagePaths for Jar not working

Status in Sikuli:
  Opinion

Bug description:
  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?

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1532134/+subscriptions