AnsweredAssumed Answered

JavaFX applications on iMX6+Vivante

Question asked by Razvan Grama on Nov 26, 2015

We currently have a project on an I.MX6 processor [1] where we would like to get JavaFX working on Frame Buffer support, but without using X11.

The openjdk wiki[2] mentions about two ways to have JavaFX running on iMX6:

  1. Direct to Frame buffer (no X11). This is the targeted path for JavaFX on ARM and the most tested
  2. Using X11 to obtain the EGL context, but acting as if we are the only application ...


We are aiming for the 1 option. So instead of using the *–, we are using the * libraries flavor from Vivante (,, as described in the openjdk wiki link [2]. Everything is working,  however, even when using fb set of libs, the X11 server seems to still be required in order for the EGL surface to be created.

Without x server running, javaFX will return “Could not get EGL surface” error:


root@varsomimx6:~# ./ -jar TurnUI.jar

Prism pipeline init order: es2

Using native-based Pisces rasterizer

Using dirty region optimizations

Using system sized mask for primitives

Not forcing power of 2 sizes for textures

Using hardware CLAMP_TO_ZERO mode

Opting in for HiDPI pixel scaling

Prism pipeline name = com.sun.prism.es2.ES2Pipeline

Loading ES2 native library ... prism_es2_monocle

Loaded /opt/java_se_embedded_8_full_release_(v1.000.002.b36)/lib/ext/../arm/ from relative path


GLFactory using com.sun.prism.es2.MonocleGLFactory

Loaded /opt/java_se_embedded_8_full_release_(v1.000.002.b36)/lib/ext/../arm/ from relative path

  1. 0x3003: Could not get EGL surface




        at com.sun.prism.es2.MonocleGLFactory.initialize(

        at com.sun.prism.es2.ES2Pipeline.<clinit>(

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Unknown Source)

        at com.sun.prism.GraphicsPipeline.createPipeline(



        at Source)


It appears that the library that is responsible for creating a surface to draw into is returning EGL_NO_SURFACE from the eglCreateWindowSurface(...) method.

The method above egl.eglCreateWindowSurface(…) calls thru to a native monocle JaveNativeInterface(JNI) method in EGL.c which marshals arguments and passes them to the libEGL function eglCreateWindowSurface(…) and returns a handle to it.


What we would like to find out is why it can’t create a surface, for example if it can’t load a particular library i.e

Are there any debug versions of libEGL libraries that you could provide us or is there an environmental variable (like mesa LIBGL_DEBUG=true) that can be exported to get debugging information from libEGL?


More general, is there anything else required, besides the proper Vivante * libs, to have JavaFX without needing X11?


Thank you,