We currently have a project on an I.MX6 processor  where we would like to get JavaFX working on Frame Buffer support, but without using X11.
The openjdk wiki mentions about two ways to have JavaFX running on iMX6:
- Direct to Frame buffer (no X11). This is the targeted path for JavaFX on ARM and the most tested
- 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 *–x11.so, we are using the *-fb.so libraries flavor from Vivante (libVIVANTE-fb.so, libEGL-fb.so, libGAL-fb.so) as described in the openjdk wiki link . 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:~# ./java-fb.sh -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/libprism_es2_monocle.so 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/libglass_monocle.so from relative path
- com.sun.glass.ui.monocle.GLException: 0x3003: Could not get EGL surface
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.lang.Thread.run(Unknown Source)
It appears that the libEGL-fb.so 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 libx11.so
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 *-fb.so libs, to have JavaFX without needing X11?