Solved JavaFX on FreeBSD?

Does anyone of you guys have experience with JavaFX on FreeBSD? Does it work or need any particular packages on top of, i.e. java/openjdk11?

I attempted to update and adopt the port for desktop/ganttproject and noticed that the latest version got rewritten to use JavaFX. I updated everything in the port to fetch the latest release, fixed some shell scripts etc.

When I attempted to start the application, it just stops without showing any GUI. Ramping up debug logging gives me
Code:
/usr/local/openjdk14/bin/java -Xmx1024m -Duser.dir=/home/lclchristianm com.bardsoftware.eclipsito.Launch --verbosity 100 --version-dirs /usr/local/share/ganttproject/plugins:~/.ganttproject.d/updates --app net.sourceforge.ganttproject.GanttProject -log true -log_file /home/lclchristianm/.ganttproject.d/logs/.ganttproject-20210523150043.log
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime build
FINE: We will run with the following plugins:
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin biz.ganttproject.impex.msproject2-3.1.3100 at /usr/local/share/ganttproject/plugins/base/biz.ganttproject.impex.msproject2/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin org.ganttproject.chart.pert-3.1.3100 at /usr/local/share/ganttproject/plugins/base/org.ganttproject.chart.pert/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin biz.ganttproject.app.localization-3.1.3100 at /usr/local/share/ganttproject/plugins/base/biz.ganttproject.app.localization/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin biz.ganttproject.impex.ical-3.1.3100 at /usr/local/share/ganttproject/plugins/base/biz.ganttproject.impex.ical/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin org.ganttproject.impex.htmlpdf-3.1.3100 at /usr/local/share/ganttproject/plugins/base/org.ganttproject.impex.htmlpdf/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin net.sourceforge.ganttproject-3.1.3100 at /usr/local/share/ganttproject/plugins/base/ganttproject/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin biz.ganttproject.app.libs-3.1.3100 at /usr/local/share/ganttproject/plugins/base/biz.ganttproject.app.libs/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.ModuleRuntime lambda$build$3
FINE: Plugin biz.ganttproject.core-3.1.3100 at /usr/local/share/ganttproject/plugins/base/biz.ganttproject.core/plugin.xml
May 23, 2021 3:00:43 PM com.bardsoftware.eclipsito.runtime.Runner run
FINE: Command line args: [-log, true, -log_file, /home/lclchristianm/.ganttproject.d/logs/.ganttproject-20210523150043.log]

<upon kill ->

May 23, 2021 3:00:46 PM com.bardsoftware.eclipsito.runtime.RunLoop shutdown
FINE: Eclipsito platform is shut down.

So Java apparently starts, but my guess is, something is broken with the GUI implementation. Since it's tied into JavaFX, I first want to make sure it's really worth going down the rabbit hole of attempting a full debug.

Any suggestions or inputs would be highly welcome.
 
Well, I managed to figure it out myself (sort of). Thanks goes out to the maintainer of databases/sqldeveloper, who basically handed me the solution in its port.

For anyone else, who stumbles across this: You'll need to install java/openjfx14. The name is misleading, it appears to work with java/openjdk11 as well.

Add to your java call the parameters --module-path=/usr/local/openjfx14/lib --add-modules=javafx.swing,javafx.web.
And voila - your JavaFX application works!
 
Back
Top