So first I must point out that this is not a duplicate because I am aware a .class file can be serialized and sent over a network via a connection.
My question is, if I were to have a class sent over a network when a connection is established, and in that system (which originally does not have the class), I attempt to construct the object, it will not compile because the class is not found ahead of time.
How will I get the java code utilizing a class that does not exist (but is guaranteed to exist upon construction) to compile?
A generalized example:
I have Foo.class compiled on system A. I then serialize Foo.class and send it over a connection to system B during runtime. System B then constructs a Foo object. That makes sense right. However, compiling the code for System B will not work because it has not heard of Foo.class. It has not yet received it so it will say no such class exists during compile time.
And no, I cannot create a class Foo on System B ahead of time.
Basically, it is run-time construction and utilization of a class.