Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder --- use build > #152 or SNAPSHOT > -66

Asked by gravizip555 on 2018-12-19

Hi guys, I gave up, and decided to ask the community..

Today morning my Sikuli program worked fine, but now it doesn't. I got error in Pattern class. It can't find opencv_java342.dll

My environment:
IntelliJ IDEA, gradle, sikulixapi 1.1.4, java jdk1.8.0
Full project can be downloaded from here:

I've simplified the code, so now I have only one class and one png image as resource:
Execution fails in runtime (see picture above):
loadlib: opencv_java342.dll not in any libs folder
Exception in thread "main" java.lang.ExceptionInInitializerError
 at org.sikuli.script.Pattern.<init>(
 at Launcher.main(
Caused by: java.lang.RuntimeException: Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder
 at org.sikuli.script.Sikulix.terminate(
 at org.sikuli.script.RunTime.terminate(
 at org.sikuli.script.RunTime.libsLoad(
 at org.sikuli.script.RunTime.loadLibrary(
 at org.sikuli.script.Finder2.<clinit>(
 ... 2 more

Gradle build file content:

I even tried to download opencv_java342.dll and load it in runtime in my code, it didn't help..also tried to reimport sikulixapi in gradle by deleting gradle's cache- it also didn't help. And the program worked in the morning smoothly, and now(when I came back from work) it doesn' strange..
Any suggestions? Thanks in advance for any help!

Update: Just copied the project to different Windows machine - same result, throws error..

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

Sorry for the inconvenience.

Yesterday there was a snapshot with this problem on Windows for some hours.

The latest snapshot should work again (

Since I am developing on Mac, there was a delay ;-) before testing the fix on Windows.

gravizip555 (gravizip555) said : #2

RaiMan, thank you for the reply!

I've tried to re-import sikulixapi, and still I see same issue. Could you please confirm that I am using latest snapshot (see image below)?

gravizip555 (gravizip555) said : #3

And yes, as you've noticed I am on Windows (x64) :)

RaiMan (raimund-hocke) said : #4

Ok, there was a problem left, when using the snapshot-jar.

It is fixed now.

reload and get snapshot ....-65

gravizip555 (gravizip555) said : #5

As I see new versions ..-65 and ..-66 are available, but my gradle hardly continues to download ..-64th version:

I know that this is like an offtopic question but maybe you know how to force gradle to download latest snapshot (by timestamp)? As far as I know it must download latest version by default. Last two days definitely not the luckiest for me :)

gravizip555 (gravizip555) said : #6

Ok, I've removed everything from c:\Users\<username>\.gradle\caches\ and gradle downloaded ..-66th snapshot (sikulixapi-1.1.4-20181220.120539-66.jar), which is latest. See screenshot:

Same issue..could you please check this snapshot, maybe you missed something during applying fix?

gravizip555 (gravizip555) said : #7

This is a regression since 1.1.4-20181214.081346-62. Just downgraded to this version using gradle and everything works fine now.

p.s: Additionally I would like to say huge thank you to RaiMan for supporting this wonderful project, documentation is very easy to read and understand, it just rocks! Thank you guys for this product.

p.s.s: I am closing the issue as 'solved'.

RaiMan (raimund-hocke) said : #8

Sorry for the inconvenience.

fixed build #153 / snapshot 20181220.142335-67

I have to revise my test strategy, to also do some tests also with the jar from OSSRH.

Evgeniy (evgeniysm) said : #9

I have the same error:
Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder

env: Eclipse, Win 7 x64.

Try to download the ready to use sikulixapi.jar and use snapshot in Gradle project (com.sikulix::sikulixapi::1.1.4-SNAPSHOT).
I'm new in Java/Gradle. Help me downgrade to 1.1.4-20181214.081346-62 please.

now I write
   compile 'com.sikulix:sikulixapi:1.1.4-SNAPSHOT'
in dependencies section of build.gradle.

RaiMan (raimund-hocke) said : #10

@Eugen ;-)
latest snapshot from today should work.

when on Linux:

Evgeniy (evgeniysm) said : #11


Thank you! I download latest the ready to use sikulixapi.jar. And it's work!