Can an application running in a version 1.1.x JVM read an object that was serialized by an application running in a version 1.2.x JVM?
Changes were made to the default serialization stream format between version 1.1.x and version 1.2.x of the JDK. As a result, if you are writing objects with one version and reading them with another you may have to take special steps to ensure compatibility.
There are two distinct forms of the serialization protocol used. These protocol versions are identified by constants in the ObjectStreamConstants class:
- JDK 1.1.x defaults to writing using PROTOCOL_VERSION_1
- JDK 1.2.x defaults to writing using PROTOCOL_VERSION_2
- JDK 1.1.7 and higher can read both protocol versions