How to fix jfoenix modules with javafx 11

对着背影说爱祢 提交于 2019-12-01 02:22:52

问题


So I'm adding my requires for module-info.java and finally got my program to load but as soon as tab pane wants to load from jfoenix library this error is thrown.

Caused by: java.lang.IllegalAccessError: class com.jfoenix.skins.JFXTabPaneSkin (in module com.jfoenix) cannot access class com.sun.javafx.scene.control.behavior.TabPaneBehavior (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.behavior to module com.jfoenix

回答1:


One way you can try fixing this is by adding the vm option for the required export:

--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix

The ideal solution to that would be the jfoenix library to move away from using com.sun.javafx.scene.control.behavior.TabPaneBehavior.




回答2:


I was able to successfully run every aspect of the jfoenix library thus far. I still have some testing to do in my application to make sure there are no errors hidden but at this moment the following VM options fixed the issue :

--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix
--add-exports javafx.controls/com.sun.javafx.scene.control=com.jfoenix
--add-exports javafx.base/com.sun.javafx.binding=com.jfoenix
--add-exports javafx.graphics/com.sun.javafx.stage=com.jfoenix
--add-exports javafx.base/com.sun.javafx.event=com.jfoenix


来源:https://stackoverflow.com/questions/53037442/how-to-fix-jfoenix-modules-with-javafx-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!