HanSolo / tilesfx

A JavaFX library containing tiles that can be used for dashboards.
Apache License 2.0
1.43k stars 201 forks source link

Exception in Application init method #112

Closed centraldave closed 4 years ago

centraldave commented 4 years ago
12:00:04: Executing task 'Demo.main() --stacktrace'...

> Configure project :
Project : => 'eu.hansolo.tilesfx' Java module
[versioning] WARNING - the working copy has unstaged or uncommitted changes.

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE

> Task :Demo.main() FAILED
3 actionable tasks: 1 executed, 2 up-to-date
Exception in Application init 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 init method
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:895)
    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 eu.hansolo.tilesfx@11.45/eu.hansolo.tilesfx.addons.Indicator.<init>(Indicator.java:78)
    at eu.hansolo.tilesfx@11.45/eu.hansolo.tilesfx.addons.Indicator.<init>(Indicator.java:72)
    at eu.hansolo.tilesfx@11.45/eu.hansolo.tilesfx.Demo.init(Demo.java:725)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
    ... 2 more
Exception running application eu.hansolo.tilesfx.Demo

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':Demo.main()'.
> Process 'command 'C:/Users/User/.jdks/adopt-openjdk-13.0.2-1/bin/java.exe'' finished with non-zero exit value 1
HanSolo commented 4 years ago

Just tested it on my machine using JDK11 and JDK15 and it works fine. Can you please try to run it like this: ./gradlew Demo

centraldave commented 4 years ago

Just tested it on my machine using JDK11 and JDK15 and it works fine. Can you please try to run it like this: ./gradlew Demo

Running with JDK13.0.2 and works amazingly good. Thank you for the hard work! 😀