ImagePath.getBundlePath() returns null

Asked by johnny doe

Hello I am trying to use the function but it returns null what is the new way to return the bundle path

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :

what are you trying? what SikuliX?

- IDE scripting?
- Java programming?

sample code?

Revision history for this message
johnny doe (edison2214) said (last edit ):

Java Programming

I try to call ImagePath.getBundlePath() and it returns null . On version 1.x.x it does not returns null.

I have tried the ff

create new instance
ImagePath ip=new ImagePath();
//set the path

it still returns null

Revision history for this message
RaiMan (raimund-hocke) said :

In Java programming the bundle path is null per default.

You might use ImagePath.setBundlePath(...) to set it before using any other SikuliX features, which rely on bundle path.

ImagePath.add() adds a new path entry to the end of the image path list (entry 1+), but does not touch the bundle path (entry 0).

When looking for image files, the image path is scanned from entry 0 upwards until first filename match (skipping null entries).

Can you help with this problem?

Provide an answer of your own, or ask johnny doe for more information if necessary.

To post a message you must log in.