Getting java.lang.Exception.InInitializerError at org.sikuli.script.Pattern Exception

Asked by Emmanuel Mbambo


I've been using sikuli version 4.1.0 with java 8 on eclipse on windows 10 for the past 2 months.

Yesterday when I ran the code a couple of times, it worked, then I got the following Exception:

Exception in thread "main" java.lang.Exception.InInitializerError
at org.sikuli.script.Pattern<init>(
at sikuliTess4j.SikuTess4j.main(
Caused by: org.sikuli.script.SikuliXception: loadlib: opencv_java430.dll not in any libs folder

I added this (api-ms-win-downlevel-shlwapi-l1-1-0.dll) missing file on my windows System32 path but I'm still receiving the same Exception when trying to find a pattern.

The code will actually work when I click or type using a region but when I try finding a pattern I get the above Exception.

Please assist.

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Solved by:
Emmanuel Mbambo
Last query:
Last reply:
Revision history for this message
Emmanuel Mbambo (emmasibu) said :

Sorry the sikuli version I'm using is 4.5.4

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

4.5.4 is not a valid SikuliX version.

Actually supported versions are 2.0.x (most recent 2.0.5).

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

do the following:
- in <APPDATA> folder delete folder SikuliX
- run the SikuliX IDE
- capture an image and open Preview -> Matching Preview

If everything works, run your Eclipse stuff.

This should have restored the needed files in <APPDATA>/Sikulix