小强叔叔3514711
2016-09-20 16:17
运行objiec的序列化会出现一下异常
Exception in thread "main" java.io.InvalidClassException: mukeProject_4.Student; local class incompatible: stream classdesc serialVersionUID = 1508134281044330490, local class serialVersionUID = 8727940698415832477
at java.io.ObjectStreamClass.initNonProxy(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 mukeProject_4.ObjectSerializable.main(ObjectSerializable.java:22)
解决了吗???
楼上说的对!
UID不同造成的
文件传输基础——Java IO流
133754 学习 · 1030 问题
相似问题