Mac 10.8 10.9: Java says it needs X11 on the machine - install XQuartz

Asked by slothbear

I'm totally new to Sikuli, so please excuse if this is a totally doofus question. When I try to run a script, I get the following message:
   To open "java," you need to install X11.

The docs are pretty thorough and mention other prerequisites, but I didn't notice X11. I've also searched and searched and didn't find anyone else mentioning this – or other questions about X11 here.

Perhaps my system is misconfigured and the X11 message is spurious?

I'm running Mac OS X 10.9.2.
I re-installed Java tonight, but... the file I downloaded and ran was called jre-7u55-macosx-x64.dmg, and when I check 'java -version', I see
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

I'm not familiar with Java versioning, but '55' seems different than '45'. Perhaps the X11 message is happening because I've messed up my system.

If X11 is required, I can go with that. If X11 is not required – just let me know and I'll work on sorting out my installation somehow.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
RaiMan Edit question
Solved by:
slothbear
Solved:
Last query:
Last reply:
Revision history for this message
slothbear (pcm-1) said :
#1

I got the same X11 message during the setup phase – when it tried to run a test I think. These lines at the bottom of the SetupLog seem to say it found my screen, which is 1440x900. These are the last lines in the log file.

[debug (5/5/14 9:56:57 PM)] RunSetup: trying to run a test using SikuliScript with JRuby
[debug (5/5/14 9:57:01 PM)] JRubyScriptRunner: executeScriptHeader: adding SikuliX Lib path to sys.path
/Volumes/outback/downloads/sikulix/sikulixsetup-1.1.jar/Lib
[debug (5/5/14 9:57:06 PM)] Screen: initScreens: basic initialization (1 Screen(s) found)
[debug (5/5/14 9:57:06 PM)] Screen: *** monitor configuration (primary: 0) ***
[debug (5/5/14 9:57:06 PM)] Screen: 0: S(0)[0,0 1440x900]
[debug (5/5/14 9:57:06 PM)] Screen: *** end monitor configuration ***

Revision history for this message
slothbear (pcm-1) said :
#2

And if X11 is required, are there any recommendations on which version to use? The message is offering to install Apple's X11, but I found an opinion that suggests XQuartz may be better:
http://hints.macworld.com/article.php?story=20120719101352282

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

I am not aware of this.
But a quick googling revealed, that this might be a case since X11 is no longer with OSX automatically since 10.8

But I will check that the next weeks.

Meanwhile you do no harm to your system installing XQuartz (http://xquartz.macosforge.org/landing/), which is the package supported and recommended by Apple itself.

Revision history for this message
slothbear (pcm-1) said :
#4

Thanks for the quick help! Yes it is true that Apple stopped including X11 with Mac OS X.
http://support.apple.com/kb/ht5293

I agree that it would do no harm to install XQuartz, but if X11 is a prerequisite for Sikuli, it would be helpful to list it as such.

Thanks again! I'm having a great time watching automation now. such great fun.