trying to run 'runIDE' script on mac, getting error: Unable to access jarfile /sikuli-ide.jar

Asked by David Douglas

I'm (still, see former questions) trying to get my sikuli script started from the command line. For starters, I've found a way to *click* on the *.sikuli file and get it executed, but when I run this command on mac:

    open script.sikuli

The script doesn't open property (see former question of mine).

So I'm trying to use the runIDE shell script as instructed in answer to a former question, but am getting this error:

    Davids-MacBook-Pro:Contents davidddouglas$ ./runIDE -r ~/Downloads/sikuli_costar.sikuli
    SIKULIX_HOME in environment specified as /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar
    running SikuliX-IDE: -Xmx512M -Dapple.laf.useScreenMenuBar -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
    -jar /sikuli-ide.jar -r /Users/davidddouglas/Downloads/sikuli_costar.sikuli
    Unable to access jarfile /sikuli-ide.jar

Am I not selecting the right jar file? I don't see any file named "sikuli-script.jar" on my computer.

My $SIKULIX_HOME variable is set to /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

simply try the following (in a Terminal / command line):

- go to your home folder

java -Dsikuli.FromCommandLine -jar /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar -r Downloads/sikuli_costar.sikuli

You might put this into a command script: (e.g. myrunner)

java -Dsikuli.FromCommandLine -jar /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar $*

then you can use it as
. myrunner -r path-to-a-script.sikuli

I am sorry, but the 1.0.1 is a mess ;-)

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

… and if you want to know the cause for the problem:

if you run the runIDE shell script in the same folder as the jar is located, the the jar becomes /sikuli-ide.jar, which is nonsense, since it should simply be sikuli-ide.jar.

This shell script was designed to be used in the place where the scripts are ;-)

… but as I said: a mess ;-)

Revision history for this message
David Douglas (ddd1600) said :
#3

OK, that worked:

    java -Dsikuli.fromCommandLine -jarApplications/SikuliX-IDE.app/Contents/sikuli-ide.jar -r sikuli_costar.sikuli

HOWEVER, the stupid popup asking me for extra command line options in the GUI still comes up, stalling the entire process. The command line options are successfully passed in however.

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

it must be
 -Dsikuli.FromCommandLine

Can you help with this problem?

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

To post a message you must log in.