站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Using Externalization and Evolution - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Using Externalization and Evolution

Running the Example

Complete the following procedure to compile and run this example:

  1. From yourbasedir/objectserializationexamples/ExternalizationandEvolution, compile the Original Class using JDKTM 1.2 or higher:
      javac ExternExampleOriginalClass.java
    
  2. Run the Original Class with the serialization flag:
      java ExternExampleOriginalClass -s
    
  3. Compile the Evolved Class:
      javac ExternExampleEvolvedClass.java
    
  4. Run the Evolved Class with the deserialization flag:
      java ExternExampleEvolvedClass -d 
    

This procedure tests compatibility in one direction only. To test bidirectional compatibility, perform the same procedure in the other direction (in steps 1-4, replace the original class name with the evolved class name, and vice versa).

Additional Information

Abstract
Sources
List of Examples