Cannot save scripts using IDE on Mac

Asked by Ira Fuchs

I am running the sikuli IDE jar from terminal.app on MacOS v10.14.6. It runs but every time I go to run a script, the dialog to save the script comes up but it does not save it. Also, the dialog to save comes up at /Users and I cant find a way to select another path (double clicking does not work). The script runs but is never saved.
My objective is actually to be able to run sikuli from a python script so that I can feed it text from another source but I thought I could get started with the IDE and work from there.

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
RaiMan (raimund-hocke) said :
#1

what SikuliX version?

Revision history for this message
Ira Fuchs (ihf) said :
#2

I am running sikulixide-2.0.5-mac.jar

> On Feb 25, 2022, at 10:31 AM, RaiMan <email address hidden> wrote:
>
> Your question #700736 on SikuliX changed:
> https://answers.launchpad.net/sikuli/+question/700736
>
> Status: Open => Needs information
>
> RaiMan requested more information:
> what SikuliX version?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/sikuli/+question/700736
>
> You received this question notification because you asked the question.

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

I am sorry, but I cannot test on macOS 10.14 (already on macOS 12).

There I tested with a 2.0.5 on Java 8 (supposing you are on Java 8) and had no problems with IDE -> File -> Save dialogs.

May be it is a Java problem.
You should try with a latest Java OpenJDK 8 (AdoptOpenJDK or from Azul)

Revision history for this message
Ira Fuchs (ihf) said :
#4

I installed the latest Java SDK but I don't think that is what I am seeing when I run sikuli from the CLI.

%java --version
openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.18.0, JRE 13 Mac OS X amd64-64-Bit 20200118_155 (JIT enabled, AOT enabled)
OpenJ9 - 6968c18d7
OMR - 7a1b0239a
JCL - 9c5a41bd5f based on jdk-13.0.2+8)

Not sure how to get sikuli to run with newer java.

Revision history for this message
Ira Fuchs (ihf) said :
#5

When I run sikuli from terminal, it says it is running under Java 13. Is that what it should say?

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

use on Terminal:
/usr/libexec/java_home -V

to see what Java versions you have installed where.

If on Terminal you run
java -version

what is shown is the Java version used when you issue a java command on command line

So to run the SikuliX IDE with a suitable java version use in Terminal
java -jar <path-to>/sikulix.....jar

Before this you can select the java version for this Terminal session using
/usr/libexec/java_home -v x.y
where x.y is a suitable version number

Revision history for this message
Ira Fuchs (ihf) said :
#7

I just tried launching it using the Java Launcher app and it seems to work correctly. I surmise that the problem is that I am not getting the same version of java or the SDK when I start from the CL. I don't know howto fix that but at least I can run the IDE.
Thanks for your help.

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

Uuuups not complete ;-)

Before this you can select the java version for this Terminal session using
/usr/libexec/java_home -v x.y
where x.y is a suitable version number

you get the path to the executables Home folder.

To activate it, use:
export JAVA_HOME=`/usr/libexec/java_home -v x.y`

Revision history for this message
Ira Fuchs (ihf) said :
#9

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (6):
    17.0.2, x86_64: "Java SE 17.0.2" /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
    13.0.2, x86_64: "AdoptOpenJDK (OpenJ9) 13" /Library/Java/JavaVirtualMachines/adoptopenjdk-13-openj9.jdk/Contents/Home
    1.8.0_45, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
    1.7.0_45, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
    1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home

$ java -version
openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.18.0, JRE 13 Mac OS X amd64-64-Bit 20200118_155 (JIT enabled, AOT enabled)
OpenJ9 - 6968c18d7
OMR - 7a1b0239a
JCL - 9c5a41bd5f based on jdk-13.0.2+8)

Revision history for this message
Ira Fuchs (ihf) said :
#10

I am not clear on what I need to specify to get the right version of Java. This is what I seem to ahve installed:

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (6):
    17.0.2, x86_64: "Java SE 17.0.2" /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
    13.0.2, x86_64: "AdoptOpenJDK (OpenJ9) 13" /Library/Java/JavaVirtualMachines/adoptopenjdk-13-openj9.jdk/Contents/Home
    1.8.0_45, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
    1.7.0_45, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
    1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home

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

these are outdated and should be purged (simply delete the folders in /Library/Java/JavaVirtualMachines/

1.8.0_45, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
1.7.0_45, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Currently one should only have the LTS versions 8, 11 and 17
https://adoptium.net (formerly AdoptOpenJDK)

The 13 is an intermediate version and no longer valid.
Your 17 looks odd.

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

--- I am not clear on what I need to specify to get the right version of Java. This is what I seem to ahve installed:

See my comment #8

Revision history for this message
Ira Fuchs (ihf) said :
#13

Right,so -v 1.8.

Revision history for this message
Ira Fuchs (ihf) said :
#14

Thanks RaiMan, that solved my question.

Revision history for this message
John Klein (johnklein94) said :
#15

Honestly, there are few casinos that provide great bonuses. I am pretty sure that casino syndicate online ( https://syndicatecasino.at/ ) will make your life better because it's goal is not to steal money but to be honest with you. If you want to quit your job and make a living from playing a casino it's your best choice!