Bundle Pydev project with Sikuli 1.1.1 as executable JAR file

Asked by Subramanian

Im using Pydev with Eclipse Neon in Windows 7 machine.
I have completed my project and I need to bundle the project as an executable.

Im using Python 3.5 with Jython 2.7 in Eclipse Neon version.
Is there is a solution to bundle to it as an executable JAR. I checked for online solutions and py2exe was suggested. But py2exe does not support Python 3.5.

Question2:
Is it possible to use Sikuli 1.1.1 with PyCharm IDE? If so I can reuse the code in PyCharm IDE and try to bundle the code in PyCharm also.

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
Best RaiMan (raimund-hocke) said :
#1

-- 1. SikuliX has nothing to do with the C-based Python. It only uses Python language and the Java based interpreter Jython (at language level 2.7). Everything with SikuliX is implemented in Java.

-- 2. py2exe can only be used with C-based Python and hence cannot be used with Sikuli(X) scripts, that need Jython as interpreter.

-- 3. You can use PyCharm to edit, run and debug SikuliX scripts (I prefer PyCharm myself since I use IntelliJ also for Java)

-- 4. A runnable jar needs the following contents:
- the Jython runtime
- the sikulixapi.jar setup for the target system
- the script(s) and the images as resources
- a Java main, that prepares the environment (Jythonpath) and loads the Jython interpreter
... and then grabs the main script from the jar as string and uses the interpreter to run it

... and the target system needs a valid Java installation.

Why do you want a runnable jar then???

Just run your scripts from commandline using the Jython interpreter.

Revision history for this message
Subramanian (subbu2687) said :
#2

Sorry, I was on vacation to India.

I was able to run the scripts using Jython Interpreter from Command line, without having to bundle the project as a JAR.
THANK YOU.

That solved the problem.

Revision history for this message
Subramanian (subbu2687) said :
#3

Thanks RaiMan, that solved my question.