Java 9: does not work with SikuliX 1.1.x (working on it --- see related bug)

Asked by simon smith

Hi,

I am trying to get Sikuli running under OSX 10.12.6 and having issues installing.
I got and installed the JDK from oracle (jdk-9_osx-x64_bin)
I then grabbed the 1.1.1 setup jar file (and also tried the nightly sikulixsetup-1.1.2-20170915.082449-36-forsetup version)

Checking java (java --verison) returns:
java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

Double clicking on the jar file (after setting executable flag with chmod +x) does nothing.

Running from the terminal with:
java -jar ./sikulixsetup-1.1.1.jar

Returns the following error:
[error] RunTimeINIT: *** terminating: Java version must be 1.7 or later!

Any ideas as to what I'm doing wrong?
I had read that I should try with java 7, but that seems not to be accessable unless you are an Oracle customer. That aside, I assume it's best to use the latest and most secure version of Java anyway.

I've been using Sikuli under Windows for a while now, and it's been very useful, but I now need to transfer what I've done to OSX but this has kind of stopped me in my tracks!

Best Regards,
   Simon C. Smith.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
simon smith
Solved:
Last query:
Last reply:
Revision history for this message
TestMechanic (ndinev) said :
#1

Use java 8

Revision history for this message
simon smith (simonsmith) said :
#2

Damn, that was an easy one to solve - thank you very much for the quick reply!

Revision history for this message
Simon Chase (schase) said :
#3

I'm running Java 8 and I get the same error

Revision history for this message
Simon Chase (schase) said :
#4

Actually, Java 9 build 181

Revision history for this message
Simon Chase (schase) said :
#5

One last thing, I'm on Windows 7 Home Premium

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

SikuliX 1.1.x definitely does not work on Java 9 (and never will).

recommendation is, to install Java 8 on current OSX's.

If you have both on your machine (Java 8 and 9) you have to assure, that Java 8 is used at SikuliX runtime

... easiest option on macOS:
- in a Terminal session
- use the command /usr/libexec/java_home to get information about installed Java versions

/usr/libexec/java_home -V
lists the installed versions

/usr/libexec/java_home -v 1.8
switches the currently used version in this Terminal session

So in your case:
/usr/libexec/java_home should point to Java 9

/usr/libexec/java_home -V should list both Java 8 and 9

/usr/libexec/java_home -v 1.8 should switch to Java 8

On Windows with more than one Java installed, you can try with the Java settings in System setup or use The JAVA_HOME environment variable in a command line.

Revision history for this message
pradgnya (pradgnya) said :
#7