running with eclipse

Asked by Simone

Hello,

I am trying to make the Sikuli source code run in eclipse but I must be doing something wrong.
Eclipse does not show me an error, but I can not run scipts or make screenshots when I run it from eclipse.
I am just a student and this is the first project of that size that I am trying to work with in eclipse, so I really hope that you can help me even if it is maybe a stupid question.

First I imported the file system and as root I used the root folder I got when I exported the branch from bazaar.

Then I added the following folders as source folders:
sikuli-ide/src/main/java
sikuli-ide/resources
sikuli-script/src/main/java
sikuli-script/src/main/python

Then I added the following .jar to the build path:
jmf.jar
junit-3.8.1.jar
jython-2.5.1.jar
swing-layout-1.0.1.jar
mx-native-loader-1.2.jar
HXGrabKey.jar
jintellitype-1..3.2.jar

I tried to add the .dll as native libraries but it does not seem to work.
I am truly not sure how to add the .dll as native libraries in a correct way and which .dll I have to add.
Also: what do I have to do to make it run?
Is it enough to run the main in the sikuli-ide or do I have to do more?

I have been trying to make it work for a long time now, I am a little frustrated at my own stupidy.
It would be really nice if you could give me some tips, because I think sikuli is a really great programm and I hope that I can learn from it.

Thank you very much.
Best regards
Simone

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
Andy Zhang (andyzhang91) said :
#1

I haven't personally gotten the source to run in Eclipse, but using the Sikuli library in Eclipse is very simple:

1. Add the OpenCV path to your Windows Environment Variables by right clicking My Computer > Properties > Advanced tab > Environment Variables > Path field under System Variables. Basically add something like "C:\Program Files\Sikuli\tmplib" to the path.

2. Find sikuli-script.jar where you installed Sikuli (usually in C:\Program Files\Sikuli).

3. Add sikuli-script.jar to your Eclipse project build path by right clicking the project name > Build Path > Add External Archives. (I'm using Eclipse Java EE Galileo.)

4. Start writing code.

This obviously won't give you access to the source, but it'll at least let you start making screenshots and scripts.

This page explains it all: http://sikuli.org/documentation.shtml#/trac/wiki/How%20to%20use%20Sikuli%20Script%20in%20your%20JAVA%20programs

Cheers,
Andy

Revision history for this message
Yanan (baoji58) said :
#2

Hi Andy,

I followed the instruction at
http://sikuli.org/documentation.shtml#/trac/wiki/How%20to%20use%20Sikuli%20Script%20in%20your%20JAVA%20programsand
ran the sample code. I got
"org.eclipse.jdt.internal.junit.runner.remoteTestRunner quit unexpectedly
while using the libcxcore.4.dylib plug-in. Click Reopen to open the
application again. Click Report to see more detailed information and send a
report to Apple." I clicked on "Report" then clicked on "Show Details" and
got the Problem Details and System Configuration info (attached).
Do you know how to solve this?

Thanks,
Yanan

On Tue, Jun 15, 2010 at 2:22 PM, Andy Zhang <
<email address hidden>> wrote:

> Question #113431 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/113431
>
> Status: Open => Answered
>
> Andy Zhang proposed the following answer:
> I haven't personally gotten the source to run in Eclipse, but using the
> Sikuli library in Eclipse is very simple:
>
>
> 1. Add the OpenCV path to your Windows Environment Variables by right
> clicking My Computer > Properties > Advanced tab > Environment Variables >
> Path field under System Variables. Basically add something like "C:\Program
> Files\Sikuli\tmplib" to the path.
>
> 2. Find sikuli-script.jar where you installed Sikuli (usually in
> C:\Program Files\Sikuli).
>
> 3. Add sikuli-script.jar to your Eclipse project build path by right
> clicking the project name > Build Path > Add External Archives. (I'm
> using Eclipse Java EE Galileo.)
>
> 4. Start writing code.
>
> This obviously won't give you access to the source, but it'll at least
> let you start making screenshots and scripts.
>
> This page explains it all:
>
> http://sikuli.org/documentation.shtml#/trac/wiki/How%20to%20use%20Sikuli%20Script%20in%20your%20JAVA%20programs
>
> Cheers,
> Andy
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Yanan (baoji58) said :
#3

 I forgot to mention that I'm working on Mac OS X 10.6.4.

On Tue, Jun 15, 2010 at 8:02 PM, Yanan <email address hidden> wrote:

> Hi Andy,
>
> I followed the instruction at
> http://sikuli.org/documentation.shtml#/trac/wiki/How%20to%20use%20Sikuli%20Script%20in%20your%20JAVA%20programsand ran the sample code. I got
> "org.eclipse.jdt.internal.junit.runner.remoteTestRunner quit unexpectedly
> while using the libcxcore.4.dylib plug-in. Click Reopen to open the
> application again. Click Report to see more detailed information and send a
> report to Apple." I clicked on "Report" then clicked on "Show Details" and
> got the Problem Details and System Configuration info (attached).
> Do you know how to solve this?
>
> Thanks,
> Yanan
>
>
> On Tue, Jun 15, 2010 at 2:22 PM, Andy Zhang <
> <email address hidden>> wrote:
>
>> Question #113431 on Sikuli changed:
>> https://answers.launchpad.net/sikuli/+question/113431
>>
>> Status: Open => Answered
>>
>> Andy Zhang proposed the following answer:
>> I haven't personally gotten the source to run in Eclipse, but using the
>> Sikuli library in Eclipse is very simple:
>>
>>
>> 1. Add the OpenCV path to your Windows Environment Variables by right
>> clicking My Computer > Properties > Advanced tab > Environment Variables >
>> Path field under System Variables. Basically add something like "C:\Program
>> Files\Sikuli\tmplib" to the path.
>>
>> 2. Find sikuli-script.jar where you installed Sikuli (usually in
>> C:\Program Files\Sikuli).
>>
>> 3. Add sikuli-script.jar to your Eclipse project build path by right
>> clicking the project name > Build Path > Add External Archives. (I'm
>> using Eclipse Java EE Galileo.)
>>
>> 4. Start writing code.
>>
>> This obviously won't give you access to the source, but it'll at least
>> let you start making screenshots and scripts.
>>
>> This page explains it all:
>>
>> http://sikuli.org/documentation.shtml#/trac/wiki/How%20to%20use%20Sikuli%20Script%20in%20your%20JAVA%20programs
>>
>> Cheers,
>> Andy
>>
>> --
>> You received this question notification because you are a direct
>> subscriber of the question.
>>
>
>

Can you help with this problem?

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

To post a message you must log in.