Results 1 to 3 of 3
- 12-11-2008, 09:00 AM #1Member
- Join Date
- Oct 2008
- Rep Power
Help in creating a NetworkClassLoader
I what to transfer a .class from a network. So i want to create a networkclassLoader which extends the parent classloader. I am unable to get any idea about how to create a network connection and send a .class from a network system.
i have developed a simple network program which just establish a connection and send a message to both the system but i am not able to send a .class file from one system to another.
So please help in creating a networkclassLoader or sample blueprint of creating a networkClassLoader file
- 12-13-2008, 02:05 AM #2
Read the class file and send as the bytes over the network, you have to use Class.defineClass(...) after that.dont worry newbie, we got you covered.
- 12-13-2008, 08:28 AM #3
defineClass(...) is a protected final method of ClassLoader, so you have to extend the class to be able to use it.
You might like to take a look at my File Class Loader, which has a public API to define and resolve a class loaded from a file or a byte array.
File Class Loader « Java Tips Weblog
- By Preethi in forum AWT / SwingReplies: 0Last Post: 01-07-2008, 02:04 PM