1. 程式人生 > >解決The type java.io.ObjectInputStream cannot be resolved.....

解決The type java.io.ObjectInputStream cannot be resolved.....

報錯內容:The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

位置:package前

原因:jdk版本不一致

解決方法:

右擊該專案工程->Build Path->Configure Build Path->選中左側的Java Build Path->Add library->選擇JRE System Library->在Alternate JRE按鈕中下拉找到其自帶的sun jdk 1.6->
點選finish完成