Mac: Library not loaded: libcxcore.2.1.dylib while Using Sikuli with Java

Asked by Dipesh

Hi

I am new to Sikuli and trying to write a Sikuli test in Java. When i try to run the program it throws below exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/YI/YIZNJftxFx4DpImiFketRl37KJM/-Tmp-/tmplib/libVisionProxy.jnilib: Library not loaded: libcxcore.2.1.dylib Referenced from: /private/var/folders/YI/YIZNJftxFx4DpImiFketRl37KJM/-Tmp-/tmplib/libVisionProxy.jnilib Reason: image not found
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1823)
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
 at java.lang.Runtime.load0(Runtime.java:770)
 at java.lang.System.load(System.java:1020)
 at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
 at org.sikuli.script.Finder.<clinit>(Finder.java:20)
 at org.sikuli.script.Region.findNow(Region.java:589)
 at org.sikuli.script.Region.wait(Region.java:277)
 at org.sikuli.script.Region.find(Region.java:235)
 at org.sikuli.script.Region.getLocationFromPSRML(Region.java:652)
 at org.sikuli.script.Region.click(Region.java:346)
 at calenderTests.main(calenderTests.java:26)

I have included the the path '/Applications/Sikuli-IDE.app/Contents/Frameworks' to class path along with Sikuli-script.jar
My program is as below

import org.sikuli.script.*;

public class calenderTests {

        public static void main(String[] args) {
                Screen s = new Screen();
                try{
                        s.click("/Users/dipeshb/Documents/sikuliPOC/sikulitPOC/images/search.png", 0);
                  }
                catch(FindFailed e){
                        e.printStackTrace();
                }
        }

Can anybody suggest me a solution so that I can proceed??

Thanks,
Dipesh

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

it seems to be Mac 10.6.

What IDE are you using?

How do you run your tests?

It is a bit complicated with X 1.0rc1. The things will run smooth with X 1.0rc2.

a workaround depends on your knowledge level according commandline:
choose basic or advanced.

the base information is at: https://answers.launchpad.net/sikuli/+faq/1436 (see related question)

If you want more help send me a mail to my address at https://launchpad.net/~raimund-hocke

Revision history for this message
Dipesh (deepesh-bhatewara) said :
#2

It is Mac 10.6.4

IDE is Eclipse Helios

Right now I have written main function and running it as a java program from Eclipse itself.

The link https://answers.launchpad.net/sikuli/+faq/1436 do not have any useful contents. It just referes to a defect.

I have X 1.0rc1, X 1.0rc2 is not yet available. How can I get around this problem, so that my test/program starts running?

Revision history for this message
Dipesh (deepesh-bhatewara) said :
#3

Also, I just wanted to add, that the IDE is not as important for me. Even if I get to run it through commandline, it would be helpful.

One more related question - which unit-testing tool would you recommend me to use with Sikuli - JUnit or TestNG.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

--- 1.
You say:
The link https://answers.launchpad.net/sikuli/+faq/1436 do not have any useful contents. It just referes to a defect.

Nevertheless the information behind the links that are available in this stub entry should be clicked and you should read through, to understand the current situation and get an idea, what you can do.

So again: I am willing to help you, since I have everything running, that you need: Netbeans, Eclipse and Jython or Java from command line. Since I will put effort in docs (FAQ 1436) only with rc2, you have to contact me directly if you want to have information now.

--- 2.
JUnit or TestNG: make your choice. has nothing to do with Sikuli. As long as you are on the Java level, Sikuli is "only" some API to "visual objects finding and acting on"

Can you help with this problem?

Provide an answer of your own, or ask Dipesh for more information if necessary.

To post a message you must log in.