Can't find JavaFX, in CircleCI, after upgrading to Java 10

I just upgraded my project from Java 8 to Java 10. It successfully builds in IntelliJ and locally running mvn --batch-mode package, but when I try to build in CircleCI I get:

[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/ConnectController.java:[5,26] package javafx.application does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/ConnectController.java:[6,19] package javafx.fxml does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/ConnectController.java:[7,28] package javafx.scene.control does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/ConnectController.java:[8,28] package javafx.scene.control does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/ConnectController.java:[9,28] package javafx.scene.control does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/Controller.java:[5,19] package javafx.fxml does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/Controller.java:[6,20] package javafx.scene does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/Controller.java:[8,26] package javafx.scene.input does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/Controller.java:[9,26] package javafx.scene.input does not exist
[ERROR] /home/circleci/repo/src/main/java/tech/dashman/dashman/controllers/common/Controller.java:[10,27] package javafx.scene.layout does not exist

Is this because JavaFX is not installed? I tried adding sudo apt-get install openjfx to my config file on top of the circleci/openjdk:10-jdk-browsers, which I’m not sure whether it’s the one I should be using or not.

I haven’t added a module-info.java, in case that’s relevant.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.