Athi / athifx

Apache License 2.0
2 stars 1 forks source link

Java 9 support #7

Open marcinMarcin opened 6 years ago

marcinMarcin commented 6 years ago

Hi,

Is Java 9 suppored? I got the error like below:

[JavaFX Application Thread] WARN org.reflections.Reflections - given scan urls are empty. set urls in the configuration
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:564)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:473)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:372)
        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:564)
        at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:945)
Caused by: java.lang.RuntimeException: Exception in Application start method
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:973)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:198)
        at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: com.github.athi.athifx.gui.configuration.ApplicationConfigurationException: Application configuration exception: To many application configuration implementations!!
        at com.github.athi.athifx.gui.application.ApplicationConfigurationUtils.initDefaultApplicationConfiguration(ApplicationConfigurationUtils.java:47)
        at com.github.athi.athifx.gui.application.AthiFXApplication.start(AthiFXApplication.java:57)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:919)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(PlatformImpl.java:449)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
        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:189)
        ... 1 more
Caused by: com.github.athi.athifx.gui.configuration.ApplicationConfigurationException: To many application configuration implementations!!
        at com.github.athi.athifx.gui.application.ApplicationConfigurationUtils.initDefaultApplicationConfiguration(ApplicationConfigurationUtils.java:42)
        ... 10 more
Exception running application com.github.athi.athifx.gui.application.AthiFXApplication
marcinMarcin commented 4 years ago

The solution for Java > 9 problem is to use forked library https://github.com/aschoerk/reflections8

<dependency>
    <groupId>net.oneandone.reflections8</groupId>
    <artifactId>reflections8</artifactId>
    <version>0.11.6</version>
</dependency>

Look this issue: https://github.com/ronmamo/reflections/pull/257