Sikuli Java API - Error when calling com.sun.awt.AWTUtilities.setWindowOpaque

Asked by Houman Farokhzad

Hi Sikuliers,

I am having a problem using Sikuli API within Eclipse. I get this error when running the HelloWorldExample.java:

Exception in thread "main" java.lang.IllegalArgumentException: The window must use a translucency-compatible graphics configuration
 at com.sun.awt.AWTUtilities.setWindowOpaque(AWTUtilities.java:378)
 at org.sikuli.api.visual.ScreenOverlayWindow.<init>(ScreenOverlayWindow.java:22)
 at org.sikuli.api.visual.LabelOverlay.<init>(LabelOverlay.java:16)
 at org.sikuli.api.visual.ScreenPainter.label(ScreenPainter.java:34)
 at org.sikuli.api.visual.ScreenPainter.label(ScreenPainter.java:29)
 at org.sikuli.api.examples.HelloWorldExample.main(HelloWorldExample.java:33)

In general, the error occurs whenever com.sun.awt.AWTUtilities.setWindowOpaque is called.

Configuration:
Ubuntu 12.04
JDK6 (Oracle)
GNOME2 (separably installed)
Eclipse (Maven plugin installed)
OpenCV2.4.2

Any thoughts?

Thanks,
Houman

Question information

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

This is not from the current Sikuli X ;-)

But this simply means, that your current grafics configuration does not support the translucency option as used/implemented by Java 6.

This is an exception, that should be handled by the programmer, when using translucency feature (In this case by the developer of
org.sikuli.api - speaking with Harry Potter: I think you know who ;-)

As far as I know: it is not tested on Linux yet and runs only on Mac and Windows.

So without modifications to the sources of org.sikuli.api, there is no chance to get it running on your system.

Revision history for this message
Houman Farokhzad (houman-farokhzad) said :
#2

Thanks RaiMan. I will look into it and will post something here if I get it working on my Ubuntu.

Houman

Revision history for this message
Houman Farokhzad (houman-farokhzad) said :
#3

The error goes away by using JDK7. Hopefully, it won't cause some other problems. So far, so good!

Thanks,
Houman