本文介绍了如何使用 javafx 11 修复 jfoenix 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我添加了对 module-info.java 的要求,并最终加载了我的程序,但只要标签窗格想要从 jfoenix 库加载,就会抛出这个错误.

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

推荐答案

您可以尝试解决此问题的一种方法是为所需的导出添加 vm 选项:

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

理想的解决方案是使用 jfoenix 库,不再使用 com.sun.javafx.scene.control.behavior.TabPaneBehavior.

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

这篇关于如何使用 javafx 11 修复 jfoenix 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-12 19:07