I noticed that in Java, you can use a class which has members of types that are unavailable to you. For example, say you have a precompiled `.class` file for the following `Person` class; but not for `Address`, which it uses:

```
public class Person implements Serializable {
    private static final long serialVersionUID = 1L;
    private String sex;
    private String name;
    private transient Address address;

    public Person(String sex, String name) {
        this.sex = sex; this.name = name; 
    }
    public void setAddress(Address address) {
        this.address = address
    }
}

```

You can instantiate this class with `Person person = Person("Male", "Andrew");` even if the type `Address` is not available to your Java project.

Now the problem is, if you want to serialize a `Person` object, you cannot do this unless the `Address` type is available (i.e. can be loaded by the class loader), even though the `Address` field **is transient**.

For some reason Java needs to know the type `Address` even though it will not need to serialize it...

Any help on how I could serialize `Person` anyway without having to redefine a `Person` class without an address? And any explanation of why Java needs to know the type of address although it will not need to serialize it?

Many thanks.