1

I am running a windows 7 64 bit machine. I installed JRE6 of 32 bit version in the PROGRAM x86 path. I have configured my JAVA_PATH environment variable in my windows to point to "C:\Program Files (x86)\Java\jre6" and the PATH variable to hold "C:\Program Files (x86)\Sikuli X\libs\;C:\Program Files (x86)\Java\jre6\bin\". Please dont ask my why, Because that is wat a lot of people suggested over the blog and i Just followed it.

I Created a new project in eclipse and added the "sikuli-script.jar" and the JRE6 details . When I run a basic program, I am getting the below error message.

import org.sikuli.script.*;

public class TestSikuli {

        public static void main(String[] args) {
                Screen s = new Screen();
                try{
                        s.click("imgs/spotlight.png", 0);
                        s.wait("imgs/spotlight-input.png");
                        s.type(null, "hello world\n", 0);
                }
                catch(FindFailed e){
                        e.printStackTrace();
                }

        }

}

[info] Windows utilities loaded. Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\anantha.navaneethago\AppData\Local\Temp\tmplib\VisionProxy.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source)

Everyone/Every blog just to ensure the windows environment variable only. But I have done what was mentioned. Now still I am getting the error message. Any help on this please.

Vinee
  • 402
  • 2
  • 10
  • 27

3 Answers3

4
  1. You must use a 32bit JRE version (I use jre-7u4-windows-i586.exe)
  2. Download Sikuli IDE for Windows (I use "Sikuli X r930", portable version)
  3. Unpack it and copy files to your project folder (I renamed it to "sikuli-ide", check image https://i.stack.imgur.com/LSiQV.png)
  4. Add sikuli-script.jar to the Referenced Libraries (Project > Properties > Java Build Path > Libraries, check image https://i.stack.imgur.com/N2SJ8.png)
  5. Set PATH and SIKULI_HOME environment vars (Run > Run Configurations > Environment, check image https://i.stack.imgur.com/HboXk.png)
  6. You're ready to go ;)
theheadofabroom
  • 20,639
  • 5
  • 33
  • 65
  • I had followed the above steps and getting the following error, Exception in thread "main" java.lang.RuntimeException: Unable to find a free port at org.openqa.selenium.net.PortProber.findFreePort(PortProber.java:66) at.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:287) at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:251) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:146) & had checked host file entry and added localhost 120.0.0.1..any one help me out – saravana Apr 21 '15 at 14:43
1

If you are only working in Java, consider switching to use the Sikuli-API library instead. It's a part of the Sikuli project designed for users who are doing pure-Java work and don't need Python support.

Using the Maven dependency for Sikuli-API works perfectly on all the platforms I've tried (Windows 7 64b, Mac OS 10.8, Ubuntu 12.4) without any hassle.

Nathaniel Waisbrot
  • 23,261
  • 7
  • 71
  • 99
0

I had a similar problem. I solved it for me and updated my question.

I hope that'll help. ;)

Update


It seems to be a problem with the path format. I'm getting that error when I use the normal Windows CMD. But everything works fine when I use bash.exe from cygwin. Maybe that will help someone!

Community
  • 1
  • 1
jsbeckr
  • 1,183
  • 1
  • 10
  • 24