上面是毕老师视频中的异常提示,这已经不是第一次出现这种情况,下面是我电脑在处理同样问题时的异常提示
Exception in thread "main" java.io.InvalidClassException: Person; local class incompatible: stream c
lassdesc serialVersionUID = -8652980158548215869, local class serialVersionUID = 5643629266527784829
at java.io.ObjectStreamClass.initNonProxy(Unknown Source) //(Unknown Source) !!!
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at ObjectStreamDemo.readObj(ObjectStreamDemo.java:14)
at ObjectStreamDemo.main(ObjectStreamDemo.java:8)
为什么我的提示不能体现出java源码的错误位置,而老师的可以呢?
是跟系统有关,还是java配置环境或者某些属性有关呢,请高手指点一下,我觉得这个对以后将来查错还是很必要的
毕竟当出现错误是,查看api是一种解决方法,如果能有源码的位置,我觉得应该会更明显的发现和解决问题 |
|