I want to use springboot + deployment headaches. Write desktop applications, but at the beginning of a building project appear problem,
According to the online tutorial to build good environment after startup project will complain you need to import the deployment headaches. The graphics module,
I according to the content of the error prompt in module - info. Java import the module before you start the program, the error null pointer exception,
Online really very little information about deployment headaches, encounter problems to search very hard, don't know which leaders met the question, comment, thank you very much!
2, the code
This is a modular file
module commclient. Spring {
Exports com.ut.com McLient;
The requires deployment headaches. Controls;
The requires deployment headaches. Base;
The requires deployment headaches. Graphics;
The requires springboot. Deployment headaches. Support;
The requires spring. The boot. Autoconfigure;
The requires deployment headaches. FXML;
The requires lombok;
}
3, the error message
Exception Application in the init method
Java. Lang. Reflect. InvocationTargetException
The at Java. The base/JDK. Internal. Reflect. NativeMethodAccessorImpl. Invoke0 (Native Method)
The at Java. The base/JDK. Internal. Reflect. NativeMethodAccessorImpl. Invoke (NativeMethodAccessorImpl. Java: 62)
The at Java. The base/JDK. Internal. Reflect. DelegatingMethodAccessorImpl. Invoke (43) DelegatingMethodAccessorImpl. Java:
The at Java. The base/Java. Lang. Reflect. Method. Invoke (564) Method. The Java:
At deployment headaches. Graphics/com. Sun. Deployment headaches. Application. LauncherImpl. LaunchApplicationWithArgs (LauncherImpl. Java: 464)
At deployment headaches. Graphics/com. Sun. Deployment headaches. Application. LauncherImpl. LaunchApplication (LauncherImpl. Java: 363)
The at Java. The base/JDK. Internal. Reflect. NativeMethodAccessorImpl. Invoke0 (Native Method)
The at Java. The base/JDK. Internal. Reflect. NativeMethodAccessorImpl. Invoke (NativeMethodAccessorImpl. Java: 62)
The at Java. The base/JDK. Internal. Reflect. DelegatingMethodAccessorImpl. Invoke (43) DelegatingMethodAccessorImpl. Java:
The at Java. The base/Java. Lang. Reflect. Method. Invoke (564) Method. The Java:
At Java. The base/sun. The launcher. LauncherHelper $FXHelper. Main (1051) LauncherHelper. Java:
Under Caused by: Java. Lang. RuntimeException: Exception Application in the init method
At deployment headaches. Graphics/com. Sun. Deployment headaches. Application. LauncherImpl. LaunchApplication1 (LauncherImpl. Java: 895)
At deployment headaches. Graphics/com. Sun. Deployment headaches. Application. LauncherImpl. Lambda $launchApplication $2 (195) LauncherImpl. Java:
At Java. The base/Java. Lang. Thread. The run (832) Thread. Java:
Under Caused by: Java. Lang. NullPointerException
The at [email protected]/DE felixroske. Jfxsupport. AbstractJavaFxApplicationSupport. LoadDefaultIcons (AbstractJavaFxApplicationSupport. Java: 362)
At [email protected]/DE felixroske. Jfxsupport. AbstractJavaFxApplicationSupport. Init (AbstractJavaFxApplicationSupport. Java: 122)
At deployment headaches. Graphics/com. Sun. Deployment headaches. Application. LauncherImpl. LaunchApplication1 (LauncherImpl. Java: 824)
. 2 more
The Exception running application com.ut.commclient.Com mClientApplication
CodePudding user response:
JDK version?Jdk8 used directly, jdk9 separation after deployment headaches, requires a separate deployment headaches - SDK installed, and then use the command line to start the application deployment headaches
Java jar - the module - the path "C: \ deployment headaches - SDK - 11.0.2 \ lib" -- add - modules=deployment headaches. Controls, deployment headaches. Web, deployment headaches. FXML mygui - 0.0.1 - the SNAPSHOT. The jar
CodePudding user response: