Why do sikuli and runnable jar created from sikuli fetch different directory?

Asked by Mae on 2019-08-15

Hi, I have this code:

path = os.path.dirname(getBundlePath())
print path

Output when running from Sikuli IDE is: C:\Users\Me\Desktop\Here\ <<<EXPECTED

But when I exported as runnable jar and executed from CMD admin, output is C:\Users\Me\Desktop <<<Could not fetch Here folder

Why is the path different with Sikuli IDE and jar?

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

SikuliX version?

Mae (nmab95) said : #2

I am using SikuliXIDE 1.1.3

RaiMan (raimund-hocke) said : #3

I am sorry, but I do not support 1.1.3 anymore with such special features.

export as runnable jar will not be available in 1.1.4+ as it is implemented in 1.1.3 (currently it is simply switched off).

What is your intention/expectation about that feature? Why do you think you need it?

Mae (nmab95) said : #4

I need the .jar file so that it can be incorporated with Java or Autoit. Or if there's a way to export sikuli script as EXE file, that would also be good. Or any other way that sikuli script can be executed without opening sikuli IDE?

RaiMan (raimund-hocke) said : #5

just use

java -jar <path-to>\sikulix.jar -r <path-to>\someScript.sikuli

from a commandline.

pack this into a run.cmd and use it as you need.

Can you help with this problem?

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

To post a message you must log in.