I am encountering an exception when trying to execute following java code:
package testSikuliPackage;
import org.sikuli.script.*;
public class MyFirstSikuliTest {
public static void main(String[] args) throws FindFailed {
float similarity = (float) 0.8;
int timeout = 5;
Pattern winStartBtn = new Pattern("img/start.PNG");
Screen s = new Screen();
if (s.exists(winStartBtn.similar(similarity), timeout) != null) {
try {
s.click(winStartBtn, 0);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
I have ensured that Java 32 bit is used. Ensured that Environment variables for java and sikuli are set correctly. Not able to figure out what is wrong exactly!
C:\Users\Admin\AppData\Local\Temp\tmplib\VisionProxy.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
at org.sikuli.script.Finder.<clinit>(Finder.java:33)
at org.sikuli.script.Regi...
I am Sorry.. I fixed this issue. It was with the environment variables. Had missed a “;”…
For others if you encounter similar issue, Please try this…
And tadaa.. It should work..!
Thanks.