[2.0.4] ImagePath.addJar() does not handle several calls

Asked by Jean Rebillat

----------------- tracked on GitHub

I have a project where I use the Sikulix Java API (version 2.0.4) with JUnit 4.
I load dynamically the test jar to use from a GUI, thus all jars are not loaded at start but at run time in a separate URLClassLoader (same one for all tests).
I want to use the Imagepath.addJar() at each test jar loading to get the images for the current test, but only the first call to addJar() is taken into account, the next calls seems to be just ignored.

How may I load several jars containing image ressources in the ImagePath ? Or is it possible to wipe the currently loaded images jar to replace it by a new one ?

Note : As I only need the current test's jar, a reset() of the ImagePath before addJar() of the new current jar does the trick and refresh the images list. It is thus not urgent anymore for me, but I think there is something not normal with calling addJar() several times.

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

have to evaluate

Can you help with this problem?

Provide an answer of your own, or ask Jean Rebillat for more information if necessary.

To post a message you must log in.