Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4087042

JDK1.2 java.awt.Font cannot be de-serialized in a JDK1.1.4 VM

XMLWordPrintable

    • sparc
    • solaris_2.5.1

      The class java.awt.Font is not backward compatible in the context of object serialization. The problem manifests itself when a java.awt.Font object is created in a JDK1.2 VM, is serialized out to a process running in a JDK1.1.4 VM, and then de-serialized within the JDK1.1.4. The exception that is thrown is

      java.lang.ClassNotFoundException: java/awt/font/TextAttributeSet

      To reproduce the problem get the following files:

      (East Coast) ~jackson/java/bounce.tar
      (West Coast) ~gjackson/java/bounce.tar

      - untar to extract

      Bounce.java
      BounceFrame.java
      SerialServer.java

      - compile SerialServer and run in a 1.2 VM

      java SerialServer

      - edit BounceFrame by going to the line where a "Bounce" object is being created and specify the anme of the host that you are running the SerialServer on

      - compile Bounce and BounceFrame and run in a 1.1.4 VM

      java test.serialization.BounceFrame

            Unassigned Unassigned
            tkincaidsunw Tom Kincaid (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: