Comments (5)
I was starting it from IntelliJ IDEA with the Run Configuration "Designer (JRE 17)" and the profiles
- with-javafx (already present)
- with-javafx17:
<profile> <id>with-javafx17</id> <properties> <openjfx.version>17.0.7</openjfx.version> </properties> </profile>
I see these warnings on startup:
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
WARNING: Unknown module: javafx.controls specified to --add-opens
WARNING: Unknown module: javafx.controls specified to --add-opens
Juni 10, 2023 12:06:24 PM com.sun.javafx.application.PlatformImpl startup
WARNUNG: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @71250d6a'
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).
from pmd-designer.
Starting the designer from the binary dist, I use
- java 20 (from adoptium)
- javafx 17.0.6 (via JAVAFX_HOME=....)
I get just the following warning on startup:
[JavaFX-Launcher] WARN javafx - Unsupported JavaFX configuration: classes were loaded from 'unnamed module @7923f745'
That's essentially the problem, we don't use modules and javafx should be used via modules.
I've buried this deep down in my TODO list:
- PMD Designer: use javafx as modules
https://stackoverflow.com/questions/67854139/javafx-warning-unsupported-javafx-configuration-classes-were-loaded-from-unna
java --module-path /home/andreas/programs/openjdk/javafx-sdk-17.0.6/lib --add-modules javafx.controls,javafx.fxml -cp /home/andreas/PMD/source/pmd/pmd-dist/target/pmd-bin-7.0.0-SNAPSHOT/conf:/home/andreas/PMD/source/pmd/pmd-dist/target/pmd-bin-7.0.0-SNAPSHOT/lib/* net.sourceforge.pmd.cli.PmdCli designer
from pmd-designer.
Thanks for the update!
I tried your with-javafx17
profile but from the IDE I get java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemUtils
after the javafx warnings you also have. For some reason intellij doesn't add the dependencies correctly from the maven config.
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's essentially the problem, we don't use modules and javafx should be used via modules.
I've buried this deep down in my TODO list:
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?
from pmd-designer.
I've tested it now:
- our start script (pmd) is not prepared for azul zulu jdk+fx builds. We still demand to set JAVAFX_HOME.
- java 11 works without any changes
- java 17 doesn't work anymore: we need to open up javafx.xml/com.sun.javafx.fxml.builder - since we call this class in DesignerUtil:
--add-opens javafx.fxml/com.sun.javafx.fxml.builder=ALL-UNNAMED
** However, with that in place, I get
Caused by: java.lang.RuntimeException: Cannot create instance of net.sourceforge.pmd.util.fxdesigner.util.controls.NodeEditionCodeArea with given set of properties: [stylesheets, designerRoot]
at javafx.fxml/com.sun.javafx.fxml.builder.ProxyBuilder.build(ProxyBuilder.java:272)
Which probably means, that this internal class changed in an incompatible way.
- java 21 shows the same result
from pmd-designer.
With be13091 we use now openjfx 17 by default.
However, we don't yet support the azul jdk+fx builds, we probably need to use the module system properly: E.g. it is no problem to use oracle's java 8 build, which also includes javafx, because there is no module system, that disallows access to internal classes. But since java 9, these access restrictions are enforced. When using openjfx via classpath (as we do with JAVAFX_HOME), then there are also no enforced restrictions yet.
However, we don't use javafx correctly:
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @b121a86'
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.
from pmd-designer.
Related Issues (20)
- Extension points for the designer
- Bug with property description being unwritable
- Use TextTreeRenderer from pmd-core
- Update PMD 7 Logo in the Designer
- Designer won't start on macOS 11.3 (M1) HOT 4
- Upgrade openjfx to 17 HOT 3
- JVM crash when starting designer under Linux with Wayland HOT 1
- Wrong qualified name? HOT 1
- Remove dependency to jcommander
- Exceptions and errors are not always logged
- Update to PMD 7.0.0-rc3
- Rename artifactId to pmd-designer
- Counterintuitive language management
- NPE when launching Designer HOT 3
- Remove commons-io dependency
- Designer uses internal PropertyTypeId
- Provide replacement attribute for deprecated XPath attributes
- There is a null pointer generated during scanning go HOT 1
- Use JAVAFX_HOME to locate java executable HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pmd-designer.