JavaFx in headless mode


Question

Is it possible to run JavaFx in headless mode(in Java 7)? It is being used to generate images on the server but is asking for an X-Server. Does there exist something like java.awt.headless in JavaFx ?(I can't use Xvfb )

1
6
11/29/2013 6:00:41 AM

Here is how I solved this problem for server-side image geneartion on Ubuntu linux environment with jetty application server. It uses xvfb but only as a "library" - without any additional special actions on server:

apt-get install xvfb

// then on application server start:

export DISPLAY=":99"

start-stop-daemon --start --background --user jetty --exec "/usr/bin/sudo" -- -u jetty /usr/bin/Xvfb :99 -screen 0 1024x768x24

You can see the details of my server-side image generation solution in this SO question.

2
5/23/2017 11:53:03 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon