RuntimeException: Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder
RuntimeException: Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder
项目结构(可下载完整项目here):
Launcher.java
class:
import org.sikuli.script.Pattern;
public class Launcher {
public static void main(String[] args)
{
Pattern p1 = new Pattern(Launcher.class.getResource("sample.png"));
}
}
build.gradle
文件:
plugins {
id 'java'
}
group 'com.myproj'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url "http://oss.sonatype.org/content/groups/public"
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.sikulix', name: 'sikulixapi', version: '1.1.4-SNAPSHOT'
}
程序抛出以下 运行时间错误:
loadlib: opencv_java342.dll not in any libs folder
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.sikuli.script.Pattern.<init>(Pattern.java:125)
at Launcher.main(Launcher.java:7)
Caused by: java.lang.RuntimeException: Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder
at org.sikuli.script.Sikulix.terminate(Sikulix.java:58)
at org.sikuli.script.RunTime.terminate(RunTime.java:60)
at org.sikuli.script.RunTime.libsLoad(RunTime.java:915)
at org.sikuli.script.RunTime.loadLibrary(RunTime.java:1105)
at org.sikuli.script.Finder2.<clinit>(Finder2.java:33)
... 2 more
Disconnected from the target VM, address: '127.0.0.1:9172', transport: 'socket'
Process finished with exit code 1
有趣的是,我的代码在早上顺利运行。当我晚上回到家时,出了点问题。不能 运行 了..谢谢你的帮助!
我尝试过的:
- 使用Gradle从头开始重新加载
sikulixapi
包
- 下载3.4.2 opencv and load it in runtime like suggested here
- 按照描述直接将opencv_java342.dll添加到项目here
- 甚至尝试在不同的 Windows 机器上启动项目以排除环境问题 - 仍然失败
项目结构(可下载完整项目here):
Launcher.java
class:
import org.sikuli.script.Pattern;
public class Launcher {
public static void main(String[] args)
{
Pattern p1 = new Pattern(Launcher.class.getResource("sample.png"));
}
}
build.gradle
文件:
plugins {
id 'java'
}
group 'com.myproj'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url "http://oss.sonatype.org/content/groups/public"
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.sikulix', name: 'sikulixapi', version: '1.1.4-SNAPSHOT'
}
程序抛出以下 运行时间错误:
loadlib: opencv_java342.dll not in any libs folder
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.sikuli.script.Pattern.<init>(Pattern.java:125)
at Launcher.main(Launcher.java:7)
Caused by: java.lang.RuntimeException: Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder
at org.sikuli.script.Sikulix.terminate(Sikulix.java:58)
at org.sikuli.script.RunTime.terminate(RunTime.java:60)
at org.sikuli.script.RunTime.libsLoad(RunTime.java:915)
at org.sikuli.script.RunTime.loadLibrary(RunTime.java:1105)
at org.sikuli.script.Finder2.<clinit>(Finder2.java:33)
... 2 more
Disconnected from the target VM, address: '127.0.0.1:9172', transport: 'socket'
Process finished with exit code 1
有趣的是,我的代码在早上顺利运行。当我晚上回到家时,出了点问题。不能 运行 了..谢谢你的帮助!
我尝试过的:
- 使用Gradle从头开始重新加载
sikulixapi
包 - 下载3.4.2 opencv and load it in runtime like suggested here
- 按照描述直接将opencv_java342.dll添加到项目here
- 甚至尝试在不同的 Windows 机器上启动项目以排除环境问题 - 仍然失败