[1.0.1] Eclipse / PyDev / Jython: cannot find sikuli-script.jar

Asked by gary

Hi,

I am trying to get sikuli up and running on Eclipse.
I have downloaded sikuli with option4.
Plus I have installed jython and PyDev and have them working on Eclipse.

So my problem is now importing the sikuli module.
But I cannot follow the instructions given in this article -

http://doc.sikuli.org/faq/040-other-ide.html

because I cannot find the file sikuli-script.jar.
Has the standard setup recently changed?

Thanks
Gary

Question information

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

this is what you need to know for 1.0.1:
https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming

the mentioned faq is only for RC3

Revision history for this message
gary (gr8gary) said :
#2

I am new to eclipse and am struggling with the instructions you sent.
How do I go about completing the following step - have a reference to sikuli-java.jar in your project's Java class path

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

Uuups, basic Eclipse knowhow - so you should read some tutorials ;-)

project -> properties -> tab Java Build Path -> add External Jars

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

ok, you have PyDev projects:

project -> properties -> tab PYTHONPATH -> external libraries

Revision history for this message
gary (gr8gary) said :
#5

I have followed all the instructions but now get this problem.

this is my code:
print "hello"
import org.sikuli.basics.SikuliXforJython
from sikuli import *
print "success"

but when I run it I get the following error:
*sys-package-mgr*: processing new jar, 'C:\SikuliX\sikuli-java.jar'
hello
Aug 28, 2014 1:19:18 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[error] SikuliXforJython: Fatal error: Jython not found on classpath or not accessible - Sikuli might not work
Traceback (innermost last):
  File "C:\Users\GAJA\workspace\test one\src\test\test.py", line 8, in ?
ImportError: no module named sikuli

I don't know if this helps but when I downloaded sikuli from this page
http://www.sikuli.org/download.html
I made a folder on my C drive called SikuliX and saved the download to this folder,
I then chose option 4 and followed the instructions from
https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming.

Revision history for this message
gary (gr8gary) said :
#6

Are you familiar with this warning?

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

The warning you can ignore.

--- [error] SikuliXforJython: Fatal error:
… you seem not to have activated the installed Jython interpreter fro your project.

Revision history for this message
gary (gr8gary) said :
#8

Thanks RaiMan, that solved my question.