初始化错误
我正在使用Netbeans。我用绑定做了一些事情,现在每当我启动程序时,甚至在初始化表格之前,它都会给我一个错误 线程main中的异常是在表单甚至是初始化对象之前发生的。表单甚至还不是对象。我的main()中的每一行都会引发异常。随机的东西。我一点都不明白。 这是错误。 Exception in thread "main" java.lang.ExceptionInInitializerError at obd2ner.main(obd2ner.java:26) Caused by: java.lang.ClassCastException at java.lang.Class.cast(Class.java:2990) at org.jdesktop.beansbinding.Binding.convertForward(Binding.java:1312) at org.jdesktop.beansbinding.Binding.getSourceValueForTarget(Binding.java:844) at org.jdesktop.beansbinding.Binding.refreshUnmanaged(Binding.java:1222) at org.jdesktop.beansbinding.Binding.refresh(Binding.java:1207) at org.jdesktop.beansbinding.AutoBinding.tryRefreshThenSave(AutoBinding.java:162) at org.jdesktop.beansbinding.AutoBinding.bindImpl(AutoBinding.java:199) at org.jdesktop.beansbinding.Binding.bindUnmanaged(Binding.java:959) at org.jdesktop.beansbinding.Binding.bind(Binding.java:944) at org.jdesktop.beansbinding.BindingGroup.bind(BindingGroup.java:143) at OBD2nerForm.initComponents(OBD2nerForm.java:731) at OBD2nerForm.<init>(OBD2nerForm.java:75) at Status.<clinit>(Status.java:41) ... 1 more Java Result: 1 OBD2nerForm行731是bindingGroup.bind(); 有时它会在pack()上出错; “ main”中的异常似乎并不相关,因为该异常会在程序运行时发生,并且每次我注释掉一行时,它都会跳转到下一个 public …