Hi:
Today JDK 12 is released and one interesting change is they make javafx.scene.control.skin.TextFieldSkin members private
thus for JFoenix we will get some exception like:
java.lang.IllegalAccessException: class com.jfoenix.skins.JFXTextFieldSkin cannot access a member of class javafx.scene.control.skin.TextFieldSkin with modifiers "private"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:355)
so any ideas how we should fix this problem?
and I guess this problem has something to do with this issue:
https://bugs.openjdk.java.net/browse/JDK-8207942
Hi, we did face the relevant problem with the same component JFXTextFieldSkin while launching the application.
Here is the exception.
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.jfoenix.skins.JFXTextFieldSkin.updateTextPos(JFXTextFieldSkin.java:109)
at com.jfoenix.skins.JFXTextFieldSkin.layoutChildren(JFXTextFieldSkin.java:93)
at javafx.scene.control.Control.layoutChildren(Control.java:601)
java.version : 12
java.vm.version : 12+33
we use java fx bundle 12
Thought this is relevant. Let me know if this needs to be created as a new issue
I tried looking into it but @jfoenixadmin it seems that the branch JFoenix-9.0.0 hasn't been kept up to date since August 2018 :-(
I tried updating it but went over my head.
@micheljung no worries, I'll do the merge now.
However I'm not sure this will fix the compatibility with JDK 12
Same problem here with jfoenix 9.0.9
Has anybody figured out how to fix it?
I am also having a problem with jfoenix 9.0.9 and JDK 12
@jfoenixadmin not sure if you saw this already:
@TheRedSpy15 that's how we are using reflection to access private fields. however I suspect that the field either renamed or removed thus causing this issue.
I am facing this issue as well
java.lang.IllegalAccessException: class com.jfoenix.skins.JFXTextAreaSkin cannot access a member of class javafx.scene.control.skin.TextAreaSkin
@jfoenixadmin when will get a fix for this :(
is this fixed??
Not fixed yet
Am also faced with the same issue
java.lang.IllegalAccessException: class com.jfoenix.skins.JFXTextFieldSkin cannot access a member of class javafx.scene.control.skin.TextFieldSkin with modifiers "private"
did any one resolve this issue ?
Any fix?
any fix ?
Are there any plans for making JFoenix compatible with versions of Java greater than 11?
any fix to the access block to JFXTextfield and JFXPassword in jdk12?
@jfoenixadmin We need some kind of a fix for this bug please, I don't want to downgrade to jdk11 just for this issue :(
Same here. Won't use the library as I am on JDK 14 / JavaFX 12
Same here
class com.jfoenix.skins.JFXTextFieldSkin cannot access a member of class
javafx.scene.control.skin.TextFieldSkin (in module javafx.controls) with modifiers "private"
I am on JDK 14 and JavaFx 14, May be I have to downgrade to JDK 11?
@viewv yes currently that is the only solution
any fix ?
please fix it.
PLEASE!!!!!!!!
It's dead Jim
no news on the subject?
Hallelujah, I'm pushing the fix today to JFoenix 9 branch :p, I'll update the maven jars later today to x.x.10
Amazing!!
Regards,
Ngacho.
"A painting is never finished-It simply stops in interesting places."
Paul Gauguin.
On Thu, 4 Jun 2020 at 11:12, JFoeniX notifications@github.com wrote:
Hallelujah, I'm pushing the fix today to JFoenix 9 branch :p
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jfoenixadmin/JFoenix/issues/955#issuecomment-638686054,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMPONSMBBFRV7POAGFORR33RU5JP5ANCNFSM4G7ZDIJA
.
Hallelujah, I'm pushing the fix today to JFoenix 9 branch :p, I'll update the maven jars later today to x.x.10
YOU ROCK! THANKS !!!
Thank you. This is the most important lib in the fx world. Never let her die.
I've tested the fix on JDK 14 / JavaFX 14, @seinecle can you verify it's working on your environment? supposedly it should work, but it's better to test
I'm crazy to test. But I am hoping to upload the version for the maven.
it's on maven
cc @jfoenixadmin > I've tested the fix on JDK 14 / JavaFX 14, @seinecle can you verify it's working on your environment? supposedly it should work, but it's better to test
In Netbeans in a modular project it gets me a warning that the module com.jfoenix is not found. I am a noob but can it be due to the module-info file in the lib?
error:
java.lang.reflect.InaccessibleObjectException: Unable to make boolean java.lang.reflect.AccessibleObject.setAccessible0(boolean) accessible: module java.base does not "opens java.lang.reflect" to module com.jfoenix
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:349)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:289)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
at com.jfoenix/com.jfoenix.adapters.ReflectionHelper.<clinit>(ReflectionHelper.java:48)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.<init>(JFXTextFieldSkin.java:59)
at com.jfoenix/com.jfoenix.controls.JFXTextField.createDefaultSkin(JFXTextField.java:69)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2505)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NullPointerException
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.createPromptNode(JFXTextFieldSkin.java:152)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.lambda$new$1(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:123)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.<init>(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.controls.JFXTextField.createDefaultSkin(JFXTextField.java:69)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2505)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NullPointerException
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.createPromptNode(JFXTextFieldSkin.java:152)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.lambda$new$1(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:123)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.<init>(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.controls.JFXTextField.createDefaultSkin(JFXTextField.java:69)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2505)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NullPointerException
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.createPromptNode(JFXTextFieldSkin.java:152)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.lambda$new$1(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:123)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.<init>(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.controls.JFXTextField.createDefaultSkin(JFXTextField.java:69)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2505)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.NullPointerException
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.createPromptNode(JFXTextFieldSkin.java:152)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.lambda$new$1(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:123)
at com.jfoenix/com.jfoenix.skins.JFXTextFieldSkin.<init>(JFXTextFieldSkin.java:70)
at com.jfoenix/com.jfoenix.controls.JFXTextField.createDefaultSkin(JFXTextField.java:69)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2505)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:832)
@rruffer which JDK version are you using?
14
it's weird, I mean i do get a warning that the library is using reflection but not an error.
mmmm....
aha I see, try adding --illegal-access=warn to VM args when running the application
that should fix it for now, until I find a workaround for those reflection calls :s
not work for me. See my code: https://github.com/rruffer/library-fx
@rruffer, I took a look at your code and i noticed you are using maven. I have a question, how did you add the --illegal-access=warn vm arg?
Same issue:
java.lang.reflect.InaccessibleObjectException: Unable to make boolean
java.lang.reflect.AccessibleObject.setAccessible0(boolean) accessible: module java.base does not "opens java.lang.reflect" to module com.jfoenix
Ok, so according to @seinecle link, adding an open to vm arg should fix it:
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
or
--add-opens java.base/java.lang.reflect=com.jfoenix
@seinecle can you verify the fix?
Ok, so according to @seinecle link, adding an open to vm arg should fix it:
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
or
--add-opens java.base/java.lang.reflect=com.jfoenix
@seinecle can you verify the fix?
@jfoenixadmin thx! I use Maven and not sure where I can add it but will investigate
@jfoenixadmin I am using eclipse. Right click on the project. I'm going to run as. Run configuration. Tab Arguments and vm arguments.
@jfoenixadmin with --add-opens java.base/java.lang.reflect=ALL-UNNAMED
and
--add-opens java.base/java.lang.reflect=com.jfoenix
work for me
@jfoenixadmin I am using eclipse. Right click on the project. I'm going to run as. Run configuration. Tab Arguments and vm arguments.
Yes but for a packaged app?
I haven't packed it yet. but I usually use launch4j or create a .bat to pass the arguments and start the application.
There is this way to configure maven too. But I still haven't tested it by packaging:
https://github.com/openjfx/javafx-maven-plugin
https://github.com/rruffer/library-fx/blob/master/pom.xml
<plugin>
<groupId> org.openjfx </groupId>
<artifactId> javafx-maven-plugin </artifactId>
<version> 0.0.4 </version>
<configuration>
<options>
<option> --add-opens </option>
<option> javafx.graphics/javafx.css=ALL-UNNAMED </option>
<option> --add-opens </option>
<option> javafx.base / com.sun.javafx.runtime = ALL-UNNAMED </option>
<option> --add-opens </option>
<option> javafx.controls / com.sun.javafx.scene.control.behavior = ALL-UNNAMED </option>
<option> --add-opens </option>
<option> javafx.controls / com.sun.javafx.scene.control = ALL-UNNAMED </option>
<option> --add-opens </option>
<option> javafx.base / com.sun.javafx.binding = ALL-UNNAMED </option>
<option> --add-opens </option>
<option> javafx.base / com.sun.javafx.event = ALL-UNNAMED </option>
<option> --add-opens </option>
<option> javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED </option>
<option> --add-exports </option>
<option> javafx.controls / com.sun.javafx.scene.control.behavior = com.jfoenix </option>
<option> --add-exports </option>
<option> javafx.controls / com.sun.javafx.scene.control = com.jfoenix </option>
<option> --add-exports </option>
<option> javafx.base / com.sun.javafx.binding = com.jfoenix </option>
<option> --add-exports </option>
<option> javafx.graphics/com.sun.javafx.stage=com.jfoenix </option>
<option> --add-exports </option>
<option> javafx.base / com.sun.javafx.event = com.jfoenix </option>
</options>
<mainClass> br.com.rruffer.library.App </mainClass>
</configuration>
</plugin>
@jfoenixadmin works for me!
In a Maven project, place these arguments (--add-opens java.base/java.lang.reflect=com.jfoenix) in the javafx maven plugin, as instructed here.
@jfoenixadmin It's not working for me, I'm on gradle (JDK and JavaFX 14) and I tried adding those arguments in my gradle.properties and in the Run Configuration from Intellij and I still get the same error from the same issue that @rruffer had.
@jfoenixadmin It's not working for me, I'm on gradle (JDK and JavaFX 14) and I tried adding those arguments in my
gradle.propertiesand in the Run Configuration from Intellij and I still get the same error from the same issue that @rruffer had.
Nevermind, I'm sorted. I had to use --add-opens=java.base/java.lang.reflect=com.jfoenix
The = after opens was key
I had a problem with gradle and java 14. I couldn't solve it. In the maven I did it.
@jfoenixadmin It's not working for me, I'm on gradle (JDK and JavaFX 14) and I tried adding those arguments in my
gradle.propertiesand in the Run Configuration from Intellij and I still get the same error from the same issue that @rruffer had.Nevermind, I'm sorted. I had to use
--add-opens=java.base/java.lang.reflect=com.jfoenixThe
=afteropenswas key
@jackpeters667 where do you place these options in gradle ?
I saw it that way: http://quabr.com:8182/58133725/how-to-fix-jvm-options-exports-javafx-11-to-com-jfoenix-on-gradle-idea
But it would be better to ask the developers of the plugin. In the git the maven plugin teaches. They should show it too: https://github.com/openjfx/javafx-gradle-plugin
after adding the args that @seinecle mentioned im still getting the same issue

@dubbadhar your --add-opens argument did not work, that is what the exception says. You could try to launch your app through a Maven build instead of pure javac and java.exe. Using Maven, you would place the --add-opens argument in the pom.xml, following the instructions in the link I shared.
Okay, I figure out the workaround for my project ((Thank you so much for the replies above
My project is a NON-modular project, using javafx and jfoenix with Gradle.
I will give out the setup (build.gradle) that works for me as below. Remember to upgrade jfoenix to latest version (i.e. currently v9.0.10)!
... // some project config, skip it here
repositories {
mavenCentral()
}
javafx {
version = "13"
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml' ]
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.h2database', name: 'h2', version: '1.4.200'
compile 'com.jfoenix:jfoenix:9.0.10'
compile group: 'org.mindrot', name: 'jbcrypt', version: '0.4'
}
run{
jvmArgs = [
"--add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
"--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED",
"--add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED",
"--illegal-access=warn",
"--add-opens=javafx.controls/javafx.scene.control.skin=com.jfoenix",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=com.jfoenix"
]
}
...
@seinecle after adding the args to my VM in itellij this is what i get in my console
```"C:\Program Files\Java\jdk-13.0.1\bin\java.exe" --module-path "C:\Program Files\javafx-sdk-14.0.1\lib" --add-modules=javafx.controls,javafx.fxml --add-opens=java.base/java.lang.reflect=com.jfoenix --add-modules javafx.base,javafx.graphics --add-reads javafx.base=ALL-UNNAMED --add-reads javafx.graphics=ALL-UNNAMED "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\lib\idea_rt.jar=50939:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\lenovo\IdeaProjects\LoginScreen\out\production\LoginScreen;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.fxml.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.base.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.graphics.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx-swt.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.media.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.controls.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.swing.jar;C:\Program Files\javafx-sdk-14.0.1\lib\javafx.web.jar;C:\Users\lenovo.m2\repository\com\jfoenix\jfoenix\9.0.9\jfoenix-9.0.9.jar" sample.Main
WARNING: Unknown module: com.jfoenix specified to --add-opens
java.lang.IllegalAccessException: class com.jfoenix.skins.JFXTextFieldSkin cannot access a member of class javafx.scene.control.skin.TextFieldSkin (in module javafx.controls) with modifiers "private"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:376)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:642)
at java.base/java.lang.reflect.Field.checkAccess(Field.java:1075)
at java.base/java.lang.reflect.Field.get(Field.java:416)
at com.jfoenix.skins.JFXTextFieldSkin.createPromptNode(JFXTextFieldSkin.java:152)
at com.jfoenix.skins.JFXTextFieldSkin.lambda$new$1(JFXTextFieldSkin.java:70)
at com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:122)
at com.jfoenix.skins.JFXTextFieldSkin.
at com.jfoenix.controls.JFXTextField.createDefaultSkin(JFXTextField.java:69)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene.preferredSize(Scene.java:1781)
at javafx.graphics/javafx.scene.Scene$2.preferredSize(Scene.java:393)
at javafx.graphics/com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1086)
at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1174)
at javafx.graphics/javafx.stage.Window.show(Window.java:1189)
at javafx.graphics/javafx.stage.Stage.show(Stage.java:273)
at sample.Main.start(Main.java:16)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:830)
java.lang.IllegalAccessException: class com.jfoenix.skins.JFXTextFieldSkin cannot access a member of class javafx.scene.control.skin.TextFieldSkin (in module javafx.controls) with modifiers "private"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:376)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:642)
at java.base/java.lang.reflect.Field.checkAccess(Field.java:1075)
at java.base/java.lang.reflect.Field.get(Field.java:416)
at com.jfoenix.skins.JFXTextFieldSkin.createPromptNode(JFXTextFieldSkin.java:152)
at com.jfoenix.skins.JFXTextFieldSkin.lambda$new$1(JFXTextFieldSkin.java:70)
at com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:122)
at com.jfoenix.skins.JFXTextFieldSkin.
at com.jfoenix.controls.JFXPasswordField.createDefaultSkin(JFXPasswordField.java:61)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1400)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9542)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:569)
at javafx.graphics/javafx.scene.Scene.preferredSize(Scene.java:1781)
at javafx.graphics/javafx.scene.Scene$2.preferredSize(Scene.java:393)
at javafx.graphics/com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1086)
at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1174)
at javafx.graphics/javafx.stage.Window.show(Window.java:1189)
at javafx.graphics/javafx.stage.Stage.show(Stage.java:273)
at sample.Main.start(Main.java:16)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:830)
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.NullPointerException
at com.jfoenix.skins.JFXTextFieldSkin.updateTextPos(JFXTextFieldSkin.java:109)
at com.jfoenix.skins.JFXTextFieldSkin.layoutChildren(JFXTextFieldSkin.java:93)
at javafx.controls/javafx.scene.control.Control.layoutChildren(Control.java:601)
at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1207)
at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1214)
at javafx.graphics/javafx.scene.Scene.doLayoutPass(Scene.java:576)
at javafx.graphics/javafx.scene.Scene.preferredSize(Scene.java:1784)
at javafx.graphics/javafx.scene.Scene$2.preferredSize(Scene.java:393)
at javafx.graphics/com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1086)
at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1174)
at javafx.graphics/javafx.stage.Window.show(Window.java:1189)
at javafx.graphics/javafx.stage.Stage.show(Stage.java:273)
at sample.Main.start(Main.java:16)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
... 1 more
Exception running application sample.Main
Process finished with exit code 1
```
Pls any idea of what am to do
This is what i have in my VM
--module-path "C:\Program Files\javafx-sdk-14.0.1\lib" --add-modules=javafx.controls,javafx.fxml --add-opens=java.base/java.lang.reflect=com.jfoenix
If someone doesn't work to add the --add-opens to gradle or maven config files, I recommend read carefully your error because you can add some extra parameter depending of your type of error, but the solution is similar to the other params.
For example, when I added this --add-opens options, the error remained but my error was:
...cannot access class com.sun.javafx.event.EventHandlerManager (in module javafx.base) because module javafx.base does not export com.sun.javafx.event...
, then I added:
--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED,
to my build.gradle, and it works!
--module-path "#####your javafx library path####" --add-modules javafx.controls,javafx.fxml
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
Add these to your VM option
make sure to give your javafx library path
Adding just --add-opens=java.base/java.lang.reflect=com.jfoenix to VM options worked around this for me on JDK 11.
Most helpful comment
Ok, so according to @seinecle link, adding an open to vm arg should fix it:
--add-opens java.base/java.lang.reflect=ALL-UNNAMEDor
--add-opens java.base/java.lang.reflect=com.jfoenix@seinecle can you verify the fix?