You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without the API all works, but when I add it to my project as library, a syntax error ocurred.
I'm using JDK8 and Jython 2.7
Output:
Traceback (innermost last):
(no code object) at line 0
File "C:\Users\jese5\IdeaProjects\Test\lib\sikulixapi.jar", line 1
PK��
^
SyntaxError: Lexical error at line 1, column 3. Encountered: "\u0003" (3), after : ""
Process finished with exit code -1
My code:
class TOC(object):
def __init__(self):
print("Hello World")
TOC()
And the libraries:
The text was updated successfully, but these errors were encountered:
I just tested in my IntelliJ (version 1.1.4):
sikulixapi.jar must be on the Java classpath: the place to add that is in a run config in the Environment variables as CLASSPATH <path-to>sikulixapi.jar (the fat jar from the download page)
Having it anywhere else in the project environment does not help.
In your main script at the beginning add
from org.sikuli.script import SikulixForJython
from sikuli import *
This adds the needed pointers to the Jython runtime environment (sys.path, pre-imports).
Be aware: code completion does not work for the SikuliX features (not available at compile time)
Without the API all works, but when I add it to my project as library, a syntax error ocurred.
I'm using JDK8 and Jython 2.7
Output:
My code:
And the libraries:
The text was updated successfully, but these errors were encountered: