2

I'm on Windows 7 32bit, Java JRE6 31 installed and using Sikuli X 1.0rc3. I want to launch a test with sikuli-script.jar like this:

java -jar c:\sikuli\sikuli-script.jar test.sikuli

All I get is this error message:

java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError:C:\sikuli\libs\VisionProxy.dll: Can't find dependent libraries

I have set all the environment variables needed, so my PATH looks like this:

PATH=...;C:\sikuli\libs;C:\Program Files\Java\jre6\bin
SIKULI_HOME=C:\sikuli

I can use the IDE and launch the tests there etc. But only if I use the Sikuli-IDE.exe the sikuli-ide.bat and sikuli-ide.jar don't work either. Always with the same error from above. So I think in the build process of the .exe file they added some magic, but I can't figure out what it is.

Does somebody have a similar problem? Or even a solution?


Update

As I wrote below, it works out of the box with my new computer. :D But maybe my solution can help someone.

Sikuli Team uses Launch4J to build the Sikuli-IDE.exe out of the sikuli-ide.jar. They use this config file. I modified it slightly and created a Sikuli-script.exe. It was pretty simple but I lost the config file unfortunately.

Hope I could help!

jsbeckr
  • 1,183
  • 1
  • 10
  • 24

2 Answers2

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 htt+p://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 ;)
3

According to the docs

Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.

What you need to do is use this command:

-Djava.library.path=pathToDLL

Which will add your DLL that is missing.

Woot4Moo
  • 23,987
  • 16
  • 94
  • 151
  • Or alternatively, move the DLL: `C:\sikuli\VisionProxy.dll` It's better to set the lib path, though. – Dave Mar 12 '12 at 15:01
  • That doesn't work... I found a solution with Launch4j, which I will post when I have the time. – jsbeckr Mar 12 '12 at 15:26
  • I got a new computer at work, installed everything like the last time. But now it works... :D – jsbeckr Apr 03 '12 at 10:49