0

I am using a gradle build with Intellij IDEA to port a java-8 application into the 2020s. It requires the javafx.web module. I can't activate it!

My build.gradle contains the dependency:

// https://mvnrepository.com/artifact/org.openjfx/javafx-web
    implementation group: 'org.openjfx', name: 'javafx-web', version: '20-ea+11'e here

and the javafx spec:

   modules = ['javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.web']type here

My main javafx version is 17.02, but for javafx.web I have been trying through all listed versions. But for none of them does the module-info auto-complete for javafx.. allow me to specify 'web'.When I type it in, it become red (error). But javafx.webempty is available every time. Only that doesn't help me.

papaworx
  • 1
  • 1
  • Don't use the early access `ea` versions unless you want to test unreleased functionality. Ensure you have the same versions for all JavaFX dependencies. If you are using an IDE, ensure that you sync the IDE project with the Gradle project if you change the Gradle project. I don't use Gradle much, so can't advise beyond that. – jewelsea Feb 02 '23 at 17:53
  • If you're using the `org.openjfx.javafxplugin` Gradle plugin, then you should not be declaring dependencies on JavaFX manually (i.e., get rid of that `implementation` bit). You tell the plugin which modules and version you want with `javafx { modules = [...]; version = '...' }`. Once you update the build script then refresh/reimport/whatever the project in your IDE (IntelliJ should prompt you for this after modifying a build file, assuming it doesn't just refresh automatically). If you're still having an issue, then please [edit] your question to provide a [mre]. – Slaw Feb 02 '23 at 18:17

0 Answers0