9

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
KIC
  • 5,887
  • 7
  • 58
  • 98
  • possible duplicate of [How to test JavaFX 2 in a headless environment?](http://stackoverflow.com/questions/12194436/how-to-test-javafx-2-in-a-headless-environment) – disrvptor Feb 13 '14 at 11:29
  • How did you solve this issue ? please help me too – Dan Feb 18 '14 at 18:01
  • @Sundara finally the only solution was to install a X-Server :-( – KIC Feb 20 '14 at 15:04
  • thanks. what is the command for installing x-server in ubuntu? – Dan Feb 21 '14 at 05:03
  • @Sundara please use a search engine! this time I will do this for you: http://askubuntu.com/questions/213678/how-to-install-x11-xorg – KIC Feb 21 '14 at 13:24
  • This is still listed as unanswered. Maybe you could reply with the solution and mark it as an answer? Thanks! – janih Sep 08 '14 at 08:56

1 Answers1

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.

KIC
  • 5,887
  • 7
  • 58
  • 98