Scene builder报错 .reflect.InvocationTargetE

Scene builder开辟报错:java.lang.reflect.InvocationTargetException解决方案 。 简单几步 , 让你轻松解决 。

Scene builder报错 .reflect.InvocationTargetE

文章插图
方式/
11. 利用Scene builder开辟的时辰 , 呈现报错如下 , 
 Exception in Application start method
【Scene builder报错 .reflect.InvocationTargetE】java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method

Scene builder报错 .reflect.InvocationTargetE

文章插图

22.  找到建立好的.fxml文件 , 鼠标右键选择【Open in Scen Builder】

Scene builder报错 .reflect.InvocationTargetE

文章插图

33. 打开Scene builder后 , 点击菜单栏View , 弹出的菜单中选择【Show Sample Controller Skeleton】

Scene builder报错 .reflect.InvocationTargetE

文章插图

44.
3后 , 在弹出的窗口中 , 复制代码

Scene builder报错 .reflect.InvocationTargetE

文章插图

55.  找到Controller.java文件 , 进行粘贴代码(注重类名)

Scene builder报错 .reflect.InvocationTargetE

文章插图

66. 点击IDE的运行按钮 , 弹出结果如图所示

Scene builder报错 .reflect.InvocationTargetE

文章插图

7若是您感觉有效 , 记得鄙人方点击投票、点赞、存眷、留言 , 小编会按期送上更多的惊喜哦 , 您的撑持才是小编继续尽力的动力 , 么么哒 。

Scene builder报错 .reflect.InvocationTargetE

文章插图


以上内容就是Scene builder报错 .reflect.InvocationTargetE的内容啦 , 希望对你有所帮助哦!

    推荐阅读