Can serialVersionUID of java standard objects change ?

java, jvm, serialization

Solution

The serialVersionUID should only be changed if there is a change to the class that would not be compatible with previously serialized versions of it.

To see what changes would potentially break compatibility check the Specification

I highly doubt that a new version of Java would introduce any changes to core classes that would break compatibility.

Problem

On a project, we have several objects serialized. It will be necessary to use these objects on machine with different JVM (possibly different versions). Our objects serialVersionUID are fixed and won't change, but we are concerned about the serialVersionUID of the JVM standard objects, for instance ArrayList/HashSet that are used in our serialized objects. So the question is, can these serialVersionUID change between different versions of JVM or between different JVM ? Or do we have to use another serialization mechanism to support different JVMs ?

Original source

Related problems