java.io.StreamCorruptedException: invalid type code: 00

后端 未结 6 1764
天命终不由人
天命终不由人 2020-11-27 08:43

So basically im writing a client-server multiplayer game. I have a SeverCommunicationThread that creates a gameThread if he receives a RequestForGame creates a gameThread.

6条回答
  •  北海茫月
    2020-11-27 09:11

    This can also happen if the JVM reading the serialized object does not have the correct class/jar files for the object. This usually results in a ClassNotFoundException, but if you have different jar/class versions and the serialVersionUID was not changed between versions, a StreamCorruptedException is produced. (This exception may also be possible if there is a class name conflict. e.g.: a jar containing a different class with the same full class name, though they probably also need the same serilVersionUID).

    Check that the client side has the correct versions of jars and class files.

提交回复
热议问题