[oe] Fwd: Building OpenJDK 8 with X11 support

Fedor L fedor at lightpad.com
Thu Jul 21 14:24:16 UTC 2016


Hello,


I'm trying to get a Java application running on a Yocto Linux / OE based
(arm) board. The application uses Java 8 with AWT in headless mode. As I
understand, sun.awt.X11.XToolkit instance is still needed to get it running
even in headless mode.

I'm using meta-java layer from OE. By default, recipe for OpenJDK 8 builds
it without X11 support, so the application fails to run in such
environment.

To add X11 support I've created following .bbappend files:
icedtea7-native_2.1.3.bbappend
openjdk-8-native_72b05.bbappend
openjdk-8_72b05.bbappend

They contain one line only,
PACKAGECONFIG_append = " x11 "

I'm using "bitbake openjdk-8" to build it. The build of openjdk-8-native
fails with following errors:

build/tmp/work/x86_64-linux/openjdk-8-native/72b05-r0/jdk8u-e8bed1496ff2/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java:369:
error: cannot find symbol
    private boolean processClientMessage(XClientMessageEvent xclient) {
                                         ^
  symbol:   class XClientMessageEvent
  location: class XDragSourceContextPeer

and a lot of similar errors - apparently wrapper of X11 API isn't found /
isn't generated?

So far I've checked icedtea7-native build (it succeeds) - and it is the
only place where the wrapper is generated, but I cannot figure out whether
it is packaged and uploaded to sysroot for openjdk build to use - and if
not, how to do that. Or maybe openjdk should generate the wrapper itself?
Anyway, I'm stuck; any help will be appreciated!


-Fedor



More information about the Openembedded-devel mailing list