JavaFX + Xvfb - Yet another Xlib: extension “RANDR” missing on display “:99”

匿名 (未验证) 提交于 2019-12-03 00:46:02

问题:

I have an ubuntu headless server with JavaFX and Xfvb up and running. Now I have a very similar Ubuntu server and try to get my JavaFX App running with Xvfb. But I allways get an exception thrown:

Prism ES2 Error - nInitialize: glXChooseFBConfig failed Xlib:  extension "RANDR" missing on display ":99". 

Usually I could solve xrandr exception by exporting LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ But not this time. I really have no idea what is wrong ...

This is how I usually start the server:

xvfb-run -a java -cp build/classes:lib/*:/usr/lib/jvm/java-7-oracle/jre/lib/jfxrt.jar kic.engine.thrift.Server 

回答1:

Since Java 8 one can use monocle for headless JavaFX. A useful example implementation (which at least helped me) could be found in the ui4j github project ApplicationLauncher.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!