sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59047
[Question #707833]: Having problems accessing images from a runnable jar, using Sikuli 2.0.5
New question #707833 on SikuliX:
https://answers.launchpad.net/sikuli/+question/707833
I have a maven project that builds a runnable jar file and I am trying to make Sikuli recognize and access the image path. I am using eclipse IDE and the images are accessed as expected when running in the IDE. As soon as i copy/move the .jar file to a different location than the target/ directory, I receive not-found exceptions on the images. The .jar file contains and images/ folder on the root level with the images in it.
In general this is the code:
Debug.on(3)
ImagePath.add("src/main/resources/images");
try {
Screen.all().find("desktop-postman.png");
System.out.println("All good, found image...");
} catch (FindFailed e) {
System.out.println("Hmmm, did not find the image, " + e.getMessage());
}
What am I doing wrong ?
It works when running in IDE, and from the project directory in a shell using: java -jar target/myjar.jar but now when "outside" the expected folder structure.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.