You need OpenJFX for JabRef 4.0. The command sudo apt-get install openjfx should install everything you need. Further details can be found in the Installation guide.
Thanks for your answer apt-get is a Debian / Ubuntu package manager but I use a BSD. As I wrote before, there is no JavaFX available on OpenBSD (as far as I know). Is there a JabRef version available for download which does not require JavaFX ?
I read somewhere that pkg install openjfx8-devel worked. Maybe it does the trick also for you. All versions since 4.0 depend on JavaFX since we are in the progress to migrate to this new UI framework. You can still use one of the old 3.8.* releases.
We hugely improved the performance in 4.0 and again in 4.1. Maybe you find a way to install OpenJFX on BSD. If so, please write here how you did it and even better add it to the installation guide. Sorry for the inconvenience caused.