我想要寫一個invoke的程式碼片段如下
method.invoke(t,1);
其中method我已經確定有抓到,而且method也有寫好
但是會出現
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
這種error
我試著去goole
查到說可能是compiler沒設定好
或者是有重複的class名稱,導致compiler不知道要怎麼抓
但是我的compilation目前是1.6,我能選到最高的就是1.6
class名稱也應該無誤
不知道是不是還有什麼可能呢??
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.172.194
→
05/30 16:26, , 1F
05/30 16:26, 1F
→
05/30 20:33, , 2F
05/30 20:33, 2F
推
05/31 00:52, , 3F
05/31 00:52, 3F
→
06/01 23:41, , 4F
06/01 23:41, 4F
→
06/08 13:04, , 5F
06/08 13:04, 5F