Fork me on GitHub

How do you give leiningen access to your java modules? I tried doing this jvm-opts ["--add-modules" "javafx.base" "javafx.controls" "javafx.fxml" "" "" "javafx.swing" "javafx.web"], but I get the error Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.base not found. I'm on OpenJDK11 which has been linked with OpenJFX11 during compilation. Listing modules with java --list-modules shows all the javafx modules and I'm able to compile and run java files which use javafx, but for some reason leiningen can't find the javafx modules.


I've never tried this for javafx, but it used to work for xml.bind module for example. Wasn't the javafx separated from the core JDK? At least in REBL they recommend adding this as separate dependencies:


It was seperated, but on NixOS the only way to get OpenJFX support for OpenJDK11 is through using a version that is compiled with OpenJFX as a java module. The Clojure package was also updated to support REBL, but I can't get my clojure project working with the cljfx library 😕 Leiningen isn't able to access the java modules, but I don't understand why.