The bundled jython 2.7b4 cannot be used on Java 6

Asked by chris j vargo

Hi,

The setup/install for 1.1 completes fine.

On launching the app in osx 10.10. I get the error:

"bundled jython 2.7b4 cannot be used on Java 6" on launching the app.

Question information

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

if you have used the latest nightly build of version 1.1.0:

you seem to have run the setup with Java 7 or 8.

now when you run the app, you seem to use Java 6.

Setup decides what Jython to bundle at setup time.

Take a look into the setup log: you should find the information on the used Java version and the Jython that was bundled.

Revision history for this message
chris j vargo (christopherjvargo) said :
#2

Yes, your right, setup ran with Java 8:
RunningJava: Java 8 (x86_64) 1.8.0_45-b14

How do I run the program as Java 8 in osx?

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

As long as you have Java6 on your 10.10, the app will always start with Java 6 (a problem, that will not be fixed).

So either you get rid of Apples Java 6 or you run setup with Java 6.

In a Terminal:
/usr/libexec/java_home -V

tells you what versions you have where

export JAVA_HOME=`/usr/libexec/java_home -v 1.x`

switches this command line to the respective version (x = 6, 7 or 8)

after that
java -version
tells you what java is running in that session now

java -jar <path-to>/sikulixsetup-....jar
runs setup with that Java version

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

... or you start the IDE using in Terminal:
java -jar /Applications/SikuliX.app/Contents/Java/sikulix.jar

after being sure about the Java version (see comment #3)

Revision history for this message
chris j vargo (christopherjvargo) said :
#5

Thanks for your help.

After running:
/usr/libexec/java_home -V

Java 6 was the only version showing up, very odd.

Then running:
java -version

Confirmed that Java 6 was the active session.

So, simply running:

java -jar /Applications/SikuliX.app/Contents/Java/sikulix.jar

Generated a good application that launches.

Thanks RaiMan. I've been using since 2009, will send a little donation for your time.

Best,
Chris

Revision history for this message
Eridani Rodríguez (eridanired123) said :
#6

I sorted this out this by simply reinstalling Java 8, making sure I was downloading JDK and not only JRE.

There is an illustrative question about this at StackOverflow:

http://stackoverflow.com/questions/12757558/installed-java-7-on-mac-os-x-but-terminal-is-still-using-version-6