I am writing an application that works like this:
2 clients that connect to the same server, and the server shares certain events from client to client. Each client has it's own set of application-specific plug-ins. If one client has a plug-in that the other client doesn't have, I want to send the appropriate classes to the second client, and have them dynamically loaded. I have most of this done already, but as to how to dynamically load the new classes, I don't know even where to start. I'm specifically looking for resources, code snippets and pointers to other projects that may be doing the same thing. This can happen in one of 2 ways:
1) Receive all the classes as a byte stream, write them to disk as a jar file, then load it via a classloader. This one I have a general idea how to proceed, but need more specific references, pointers to books, etc, that would be helpful.
2) Recieve the classes and store them in memory, not writing them to disk. Some how classload them and have them ready for instantiation. I have no clue how to proceed here.
I'm also willing to add lots more points, and split them up, so post whatever you want, and I'll distribute points as an ongoing thing.
Thanks a lot,