Scene builder报错 .reflect.InvocationTargetE

 时间:2026-02-14 14:00:31

1、1. 使用Scene builder开发的时候,出现报错如下,

 Exception in Application start method

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

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

Scene builder报错 .reflect.InvocationTargetE

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

Scene builder报错 .reflect.InvocationTargetE

4、4. 步骤3后,在弹出的窗口中,复制代码

Scene builder报错 .reflect.InvocationTargetE

5、5.  找到Controller.java文件,进行粘贴代码(注意类名)

Scene builder报错 .reflect.InvocationTargetE

6、6. 点击IDE的运行按钮,弹出效果如图所示

Scene builder报错 .reflect.InvocationTargetE

7、如果您觉得有用,记得在下方点击投票、点赞、关注、留言,小编会定期奉上更多的惊喜哦,您的支持才是小编继续努力的动力,么么哒。

Scene builder报错 .reflect.InvocationTargetE

  • eclipse怎么让代码自动提示?
  • Eclipse中导入外部jar包?
  • eclipse如何设置java注释模板
  • 如何访问js函数的私有变量?
  • Java程序中的Menu中文名字乱码怎样解决?
  • 热门搜索
    慌慌张张匆匆忙忙为何生活总是这样 油管主播的生活 如何去除水壶里的水垢 亚马逊怎么联系卖家 bar是什么意思 手机开不开机怎么刷机 内分泌失调有什么症状 如何修改pdf文件 nba2k怎么过人 先知之手声望怎么刷