run IDE and script when restart

Asked by Javier Gonzales Rodriguez

Hello there,

am just started to use Sikuli and i have a little issue to open the IDE + script and then run it automatically.

I put this on a bash file and it opened the IDE properly but not the script.

java -jar sikulixide-2.0.4.jar /home/mint/Documents/Loops.sikuli/Loops.py
java -jar sikulixide-2.0.4.jar /home/mint/Documents/Loops.sikuli/Loops.py --r

The PC that run this script has some restarts, so am trying to run it automatically.

am using ubuntu 18.04 and sikuli 2.0.4

Regards!

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:

This question was reopened

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

according to the docs:

java -jar sikulixide-2.0.4.jar -r /home/mint/Documents/Loops.sikuli

Revision history for this message
Javier Gonzales Rodriguez (stonegarden21) said :
#2

Thanks for your reply RaiMan,

didnt work, am sure that the path is correct because is can see my files with "ls" command.

best way is to move my script to a VPS xD

Thanks anyways. regards!

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

I am not talking about the path, I am talking about the position of the -r on the command line (after the jar, before the script filename)

Revision history for this message
Javier Gonzales Rodriguez (stonegarden21) said :
#5

hi,

When i put this command: java -jar sikulixide-2.0.4.jar -r /home/mint/Documents/Loops.sikuli

it showed this:

Exception in thread "Thread-0" java.lang.ExceptionInInitializerError
 at java.prefs/java.util.prefs.FileSystemPreferencesFactory.userRoot(FileSystemPreferencesFactory.java:41)
 at java.prefs/java.util.prefs.Preferences.userRoot(Preferences.java:457)
 at java.prefs/java.util.prefs.Preferences.userNodeForPackage(Preferences.java:371)
 at org.sikuli.basics.PreferencesUser.<init>(PreferencesUser.java:53)
 at org.sikuli.basics.PreferencesUser.get(PreferencesUser.java:57)
 at org.sikuli.script.support.RunTime.cleanUp(RunTime.java:1350)
 at org.sikuli.script.support.RunTime.runShutdownHook(RunTime.java:1364)
 at org.sikuli.script.support.RunTime.access$000(RunTime.java:42)
 at org.sikuli.script.support.RunTime$3.run(RunTime.java:1056)
Caused by: java.lang.IllegalStateException: Shutdown in progress
 at java.base/java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66)
 at java.base/java.lang.Runtime.addShutdownHook(Runtime.java:216)
 at java.prefs/java.util.prefs.FileSystemPreferences$4.run(FileSystemPreferences.java:457)
 at java.prefs/java.util.prefs.FileSystemPreferences$4.run(FileSystemPreferences.java:455)
 at java.base/java.security.AccessController.doPrivileged(Native Method)
 at java.prefs/java.util.prefs.FileSystemPreferences.<clinit>(FileSystemPreferences.java:455)

it seems like am missing something.

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

just ignore it. fixed in 2.0.5

Revision history for this message
Javier Gonzales Rodriguez (stonegarden21) said :
#7

Thanks RaiMan, that solved my question.

Revision history for this message
Javier Gonzales Rodriguez (stonegarden21) said :
#8

Great!

Thanks Raiman!