2
votes

I'm trying to launch and automate windows GUI applciations like Calculator or Notepad from Eclipse in which Sikuli (.jar) is configured

Below is what I did so far and the exceptions am getting.

Configured Sikuli jar in Eclipse environment and below is my java code:

package com.test.sikuli;

import org.sikuli.script.*;

public class TestSikuli {

    public static void main (String args [])
    {
        Screen s = new Screen();
        App myapp = new App("application-identifier");
        myapp.open("C:\\Users\\bharadwaj.k\\Desktop\\Calculator.exe");
    }

}

Below is the exception am facing:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\bharadwaj.k\AppData\Local\Temp\tmplib\Win32Util.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
    at org.sikuli.script.Win32Util.<clinit>(Win32Util.java:19)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.sikuli.script.Env.getOSUtil(Env.java:91)
    at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:180)
    at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:293)
    at org.sikuli.script.Screen.initBounds(Screen.java:105)
    at org.sikuli.script.Screen.<init>(Screen.java:117)
    at com.test.sikuli.TestSikuli.main(TestSikuli.java:9)
1
Can you use 32-bit java runtime?Anton Malyshev

1 Answers

0
votes

These errors come due to the incompatible version of sikuli (32bit, 64 bit) and java (32 bit, 64 bit).

If you are using 32 bit sikuli then point to the 32 bit version of JRE in eclipse and vice-versa for 64 bit. Please do let me know for more informaton.