以文本方式查看主题 - 计算机科学论坛 (http://bbs.xml.org.cn/index.asp) -- 『 Semantic Web(语义Web)/描述逻辑/本体 』 (http://bbs.xml.org.cn/list.asp?boardid=2) ---- 这样的错误是什么原因啊? (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=30248) |
-- 作者:cheerlyhust -- 发布时间:4/9/2006 5:18:00 PM -- 这样的错误是什么原因啊? 报错如下: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at tryProject.SearchResult.search(SearchResult.java:33) at tryProject.MainPanel$ChItemListener.itemStateChanged(TryProject.java:136) at java.awt.Choice.processItemEvent(Unknown Source) at java.awt.Choice.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 谁有遇到过啊? |
-- 作者:wason21cn -- 发布时间:4/9/2006 7:09:00 PM -- NullPointerException通常都是没有预定义object下,用了这个object, 检查一下你的object. |
-- 作者:jpz6311whu -- 发布时间:4/9/2006 7:37:00 PM -- 把完整的原代码贴出来看看 |
-- 作者:fcp_w3china -- 发布时间:5/7/2009 10:18:00 AM -- 同样的问题求助! 我的代码: protected void sendData(String message) { try{ output.writeObject("CLIENT>>>"+message);//这就是35行 output.flush(); display.append("\nCLIENT>>>"+message); }catch(IOException ioException){ display.append("\nError writing object"); } } 错误: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at Client.sendData(Client.java:35) 应该怎么改才对呢?望大侠给你帮助! |
-- 作者:fcp_w3china -- 发布时间:5/7/2009 6:30:00 PM -- 我的问题解决了! 我的问题解决了,我写错了一个方法,没有获得input的值,所以出现这个错误。 你的问题应该也是有个对象为空,把代码贴出来让大家帮忙找找吧! ![]() |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
42.969ms |