-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support JavaFX as module (e.g. via azul jdk+fx) #71
Comments
I was starting it from IntelliJ IDEA with the Run Configuration "Designer (JRE 17)" and the profiles
I see these warnings on startup:
Note: I'm using openjdk from adoptium.net. I just noticed, that the run configuration is only local. But it is essentially the same as "Designer (JRE 11)", but using java17 as JRE, not exposing the env var "JAVAFX_HOME" (that's anyway not used). |
Starting the designer from the binary dist, I use
I get just the following warning on startup:
That's essentially the problem, we don't use modules and javafx should be used via modules.
|
Thanks for the update! I tried your The app starts now with JDK 21 (from openjdk), Oracle's JDK 17.0.7 and Graalvm 22, using JavaFX 17.0.7 via JAVAFX_HOME. I suppose there is something wrong with my Zulu SDK...
That would be nice in the long term. Do you know, whether this can be done without migrating all PMD modules to use java modules too? |
I've tested it now:
Which probably means, that this internal class changed in an incompatible way.
|
With be13091 we use now openjfx 17 by default. However, we don't use javafx correctly:
I guess, the first step would be, to integrate JavaFX as a module. PMD Designer + PMD would be in an unnamed module. We need then to get rid of any hacks and workarounds (e.g. --add-opens is forbidden). Then it might just work with any Java build, that includes openjfx as a module. |
I have trouble launching the designer both from within an IDE, from the maven exec task, and from the binary distribution.
I tried with a JDK 11 and 17 packaged by Amazon Zulu, which comes with JavaFX included, and got various errors. I also tried with a manual install of the JavaFX 17 SDK and with the
JAVAFX_HOME
env var that is recognized by our launch script and got the same errors.@adangel can you describe your setup to run the designer with JavaFX 17?
Using pmd-dist-bin
Launches with JDK 11, but I get the following warning:
Apparently this check doesn't match. The reported
$java_vendor $java_ver
isopenjdk 110
.With JDK 17 I get the following:
When adding
--add-opens javafx.fxml/com.sun.javafx.fxml.builder=ALL-UNNAMED
explicitly I getUsing the maven task / IDE
./mvnw -Prunning,with-javafx exec:java
With both JDKs I get the following:
This exception also happens when I launch the app from within Intellij using the provided run configurations.
Java 17 warning
I get the following warning on app startup with JDK 17
The text was updated successfully, but these errors were encountered: