Deserialize custom readObject

Hi,
during the development of a game, the objects often change, that´s why I would like to change my deserialize method.
I already know how to change my old objects to new ones, but I don´t know how to fix:

java.io.InvalidClassException: de.MineForce.Entitys.TriggerEntity; local class incompatible: stream classdesc serialVersionUID = -2213125690368815561, local class serialVersionUID = 1

I already googled it but I haven´t found a solution, because if this error appears, I don´t have the old class anymore. It would like to be able to get the old object automatically. Without using a copy of the old class in my code.
best regs

Declare your new class with a serialVersionUID of -2213125690368815561L and then at least it won’t barf on that and you can try and get the fields out of the stream.

Cas :slight_smile:

thx, works well :slight_smile: