Running a runnable jar moved to another pc

Asked by Henrique

So I managed to develop a program for automation in Sikuli and exported as a runnable JAR. Everything works, except if I run it from another PC for example because I get the error of missing images which are in the Sikuli.Sikuli in My Documents folder. My question is: do I ALWAYS need that folder to be in My Documents?

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

You have to move the images to a folder inside your java project and use the addImagePath() variant, that accepts a Java Class, that is on classpath at runtime.

see docs.

Be aware: The feature "export as runnable jar" is no longer supported with 1.1.4+

You will always need a valid SikuliX environment on other machines, to run your jar there.

java -cp <path-to>/sikulixapi.jar:your.jar your.Main.Class

Revision history for this message
Henrique (guima) said :
#2

Thanks RaiMan, that solved my question.