Mac: Want to use sikuli-script.jar in Java using Eclipse: Unable to find library META-INF/lib/libVisionProxy.dylib on classpath

Asked by Amit

Hi,

I am getting following error when I try to run sikuli script using JAVA program on MAC book
I am using sikuli rc2 latest version

Unable to find library META-INF/lib/libVisionProxy.dylib on classpath

at com.wapmx.nativeutils.jniloader.DefaultJniExtractor.extractResource(DefaultJniExtractor.java:115)
 at com.wapmx.nativeutils.jniloader.DefaultJniExtractor.extractJni(DefaultJniExtractor.java:98)
 at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:43)
 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 testSikuli.main(testSikuli.java:14)
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sikuli.script.VisionProxyJNI.new_FindInput__SWIG_0()J
 at org.sikuli.script.VisionProxyJNI.new_FindInput__SWIG_0(Native Method)
 at org.sikuli.script.FindInput.<init>(FindInput.java:39)
 at org.sikuli.script.Finder.<init>(Finder.java:13)
 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 testSikuli.main(testSikuli.java:14)

Kindly help out

Best Regards,

Amit

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
Revision history for this message
Amit (amit1976) said :
#2

yes I have gone through it but it talks more about how to run .skiluli script from command prompt , I would like to run my JAVA code from Eclipse. I am still facing the same issue.

Best Regards,

Amit

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

Sorry, finally understood now.

see: faq 1436

I have tested Eclipse only on Windows. On Mac I use Netbeans.

You might face the problem, when configuring classpath and selecting the location of sikuli-script.jar in the file dialog in Eclipse, that you cannot dive into Sikuli-IDE.app. At least with Netbeans this is the fact. So I put Sikuli-IDE.app in the classpath and edited the respective configuration file by hand to contain:
/Applications/Sikuli-IDE.app/Content/Ressources/Java/sikuli-script.jar.

Revision history for this message
Cobra (arunmoses1982) said :
#4

RaiMan

Im facing the same problem trying to run junit scripts through maven from command line in Mac. To make it more clear.....I need to add /Applications/Sikuli-IDE.app to java build path in eclipse and then edit WHAT configuration file to contain /Applications/Sikuli-IDE.app/Content/Ressources/Java/sikuli-script.jar......could you please expand.

Thanks for all the answers. Sikuli is a great tool.

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

Sorry, I am not an Eclipse or Maven user. You have to find the config file yourself.

There must be some configuration file in your Maven environment, that contains Java class path information. There you have to add the above mentioned final path.

Another possibility is, to copy sikuli-script.jar to a place, where it can be found by Maven automatically. As long as the normal /Applications/Sikuli-IDE.app directory exists on your machine, Sikuli will find it's stuff anyway. But this is the second best solution.

Can you help with this problem?

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

To post a message you must log in.