Fork me on GitHub
#leiningen
<
2019-07-21
>
skykanin10:07:19

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.graphics" "javafx.media" "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.

jumar07:07:05

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: https://github.com/cognitect-labs/REBL-distro/issues/10

skykanin17:07:07

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.