Java ControlsFX在显示时引发异常?
此程序不工作:Java ControlsFX在显示时引发异常?,java,maven,controlsfx,Java,Maven,Controlsfx,此程序不工作:Platform.runLater(()->Notifications.create().text(“Hello!”).淋浴器() If在调用时抛出空指针。 例外情况: 线程“JavaFX应用程序线程”java.lang.NullPointerException中的异常 位于org.controlsfx.control.NotificationPopupHandler.show(Notifications.java:334) 位于org.controlsfx.control.Not
Platform.runLater(()->Notifications.create().text(“Hello!”).淋浴器()代码>
If在调用时抛出空指针。
例外情况:
线程“JavaFX应用程序线程”java.lang.NullPointerException中的异常
位于org.controlsfx.control.NotificationPopupHandler.show(Notifications.java:334)
位于org.controlsfx.control.NotificationPopupHandler.show(Notifications.java:322)
位于org.controlsfx.control.Notifications.show(Notifications.java:269)
在org.controlsfx.control.Notifications.bathror(Notifications.java:253)
我有一种明显的感觉,这与maven有关,因为我一直在使用controlsfx,但这是我第一次在maven环境中使用它
POM:
公地io
公地io
2.6
com.fasterxml.jackson.core
杰克逊数据绑定
2.9.5
朱尼特
朱尼特
4.12
测试
org.hamcrest
汉克雷斯特岩芯
1.3
测试
org.controlsfx
controlsfx
8.40.14
org.apache.maven.plugins
maven jar插件
2.4
真的
com.opusconverter.Main
org.apache.maven.plugins
maven阴影插件
3.1.1
包裹
阴凉处
真的
杰克福尔
<dependencies>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.controlsfx/controlsfx -->
<dependency>
<groupId>org.controlsfx</groupId>
<artifactId>controlsfx</artifactId>
<version>8.40.14</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.opusconverter.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>jackofall</shadedClassifierName> <!-- Any name that makes sense -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>