When trying to run a JavaFX app from Raspberry Pi B+ device running Raspbian the UI does not show up unlike when running from a PC.
The command invoked was:
java -jar app.jar
What could be the problem that the UI does not show up?
The solution is to run with this command:
sudo java -Djavafx.platform=eglfb -cp /opt/jdk1.8.0_111/jre/lib/jfxswt.jar:app.jar com.app.MainApp
After doing something similar to this: