0

我正在研究我的一个小项目,以弄清楚如何创建自己的代码编辑器,所以首先我查看了一些库并找到了 RichTextFX。它有助于创建基于代码的编辑器等。https://github.com/FXMisc/RichTextFX所以我下载了包含所有依赖项的胖 JAR,并复制粘贴了 Java 关键字演示(https://github.com/FXMisc/RichTextFX/blob/master/richtextfx-demos/ src/main/java/org/fxmisc/richtext/demo/JavaKeywordsDemo.java ) 到一个测试类中,将所有内容添加到我的 module-info.java 并尝试运行该应用程序。

我收到此错误,无法访问 ListLive,为什么?

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:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:467)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:366)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:903)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:198)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalAccessError: class at.gotzi.itsmanager.panel.TestPanel (in module at.gotzi.itsmanager) cannot access class org.reactfx.collection.LiveList (in module richtextfx.fat) because module richtextfx.fat does not export org.reactfx.collection to module at.gotzi.itsmanager
    at at.gotzi.itsmanager/at.gotzi.itsmanager.panel.TestPanel.start(TestPanel.java:94)
    at at.gotzi.itsmanager/at.gotzi.itsmanager.ITSManager.start(ITSManager.java:86)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:849)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:474)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:447)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:446)
    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 at.gotzi.itsmanager.ITSManager
4

0 回答 0