[1.0] How to migrate from sikuli rc3, when using Eclipse, Netbeans and/or Jython directly?

Asked by Aravind

*** solution -------------------------------------------------------

*** what you need
- you only need the IDE package, if you want to use the Sikuli IDE in addition to Eclipse (in this case, you do not need the API package). otherwise the API package is sufficient.
- you only need Sikuli-1.0.0-SupplementalStuff with the IDE package, since it only fixes the sikuli-ide.jar
- when using the observer feature, you need Sikuli-1.0.0-SupplementalObserveOnlyOnce (fixes sikuli-script.jar)

** where to store the stuff
- so just have the selected package available unzipped somewhere outside the Program folder (I do not recommend to (or better: you should not) put the stuff in the program folder, since it is not an application and would have other drawbacks)
Use a pathname, that does not have any embedded blanks.

*** how to use sikuli-script.jar with Jython
---- having sikuli-script.jar in Jythons site-packages
Though I do not recommend, to copy sikuli stuff around (always use references), you might simply replace the old sikuli-script.jar with the new one in your site-packages folder in your case.
It is fully compatible and has some nice enhancements (wiki release note)

--- other cases
look https://answers.launchpad.net/sikuli/+question/230722

*** take care for the native stuff (libs folder)
The other even more important topic is the libs folder:
- you need an entry pointing to the libs folder in the 1.0.0 folder like with RC3 and this should be before the RC3 libs pointer (if you want to retain it):
e.g. PATH=c:\SikuliX\libs;....

- Sikuli now finds the library folder automatically, if it is in the same directory as sikuli-script.jar (this is why I recommend, to keep the sikuli stuff in one place)
- ... but currently this does not work for users like you using plain Jython with caching switched on (I guess it has ;-) (sikuli-script.jar is loaded from cachedir as long as the original does not change) and there is a Java bug, that does not return a valid jar location in this case.
workaround: in system environment set SIKULIX_HOME to the folder containing the 1.0.0 libs folder.
e.g. SIKULIX_HOME=c:\SikuliX

----------------------------------------------------------------------------------
I'm using sikuli script in Eclipse Juno on top of jython interpreter. I have downloaded the "Sikuli API 1.0.0 Win32bit", "Sikuli IDE 1.0.0 Win32bit" and "Sikuli-1.0.0-SupplementalStuff". I was using the rc3(r905) version till date. Now I have a few doubts:

1. sikuli rc3(r905) had an installer through which I got Sikuli-IDE installed and I extracted the sikuli-script.jar available in the installation folder Sikuli, to get the "sikuli" folder inside the Lib from the extracted folder and placed it in the run time path(inside site-packages in the jython installation directory).
And somewhere in the launchpad answers(related to rc3 version), i saw like either placing "sikuli" inside jython lib-packages or adding sikuli-script.jar as an external library(any one) is enough.
So same is the case here with 1.0.0 as well ? If yes, then placing the sikuli folder from the Supplementalstuff will be enough here as well? Again, then what is the relvance of Sikuli API 1.0.0 Win32bit here?

2.sikuli IDE-1.0.0 Win32bit contains a sikuli-script.jar as well . So does it perform the same function like that of the one in rc3 release ? I mean if I extract it and place it in the jython site-pkgs, will it work fine for Eclipse? then, do I need to go for the supplemental stuff ?
I did have a look at https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming.

Apologies if it seems to be foolish but I'm confused ;-)
Thanks in advance.

Question information

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

*** LOL: Apologies if it seems to be foolish ...

Sorry, but I have to apologize for the inconveniences the pure Java or Jython users had with the version 1.0.0.
I simply did not test enough for people like you with these environments.

*** what you need
- you only need the IDE package, if you want to use the Sikuli IDE in addition to Eclipse (in this case, you do not need the API package). otherwise the API package is sufficient.
- you only need Sikuli-1.0.0-SupplementalStuff with the IDE package, since it only fixes the sikuli-ide.jar
- when using the observer feature, you need Sikuli-1.0.0-SupplementalObserveOnlyOnce (fixes sikuli-script.jar)

** where to store the stuff
- so just have the selected package available unzipped somewhere outside the Program folder (I do not recommend to (or better: you should not) put the stuff in the program folder, since it is not an application and would have other drawbacks)
Use a pathname, that does not have any embedded blanks.

*** how to use sikuli-script.jar with Jython
Though I do not recommend, to copy sikuli stuff around (always use references), you might simply replace the old sikuli-script.jar with the new one in your site-packages folder in your case.
It is fully compatible and has some nice enhancements (wiki release note)

*** take care for the native stuff (libs folder)
The other even more important topic is the libs folder:
- you need an entry pointing to the libs folder in the 1.0.0 folder like with RC3 and this should be before the RC3 libs pointer (if you want to retain it):
e.g. PATH=c:\SikuliX\libs;....

- Sikuli now finds the library folder automatically, if it is in the same directory as sikuli-script.jar (this is why I recommend, to keep the sikuli stuff in one place)
- ... but currently this does not work for users like you using plain Jython with caching switched on (I guess it has ;-) (sikuli-script.jar is loaded from cachedir as long as the original does not change) and there is a Java bug, that does not return a valid jar location in this case.
workaround: in system environment set SIKULIX_HOME to the folder containing the 1.0.0 libs folder.
e.g. SIKULIX_HOME=c:\SikuliX

*** hope it helps
I am on the way with the service update 1.0.1 for July. All these problems will be fixed then.

Come back for more support.

Revision history for this message
Aravind (a4aravind) said :
#2

Raiman , You made it very comprehensible. Thanks a lot.
Eagerly waiting for Sikuli 1.0.1 :-)

Revision history for this message
Aravind (a4aravind) said :
#3

Thanks RaiMan, that solved my question.

Revision history for this message
Sathish Nagarajan (sathish-nagarajan) said :
#4

Hi,
I am new bee to sikuli. I was able to configure and sikuli IDE and create some sikuli testcases.
Now we want sikuli to run in Java program(in eclipse).

Whatever mentioned in the following link,
http://doc.sikuli.org/faq/030-java-dev.html
doesn't working. kindly help me.