GeeCON Prague 2014*
The moose likes Java in General and the fly likes Dynamic Proxy class in JDK1.1.8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Dynamic Proxy class in JDK1.1.8" Watch "Dynamic Proxy class in JDK1.1.8" New topic
Author

Dynamic Proxy class in JDK1.1.8

Madi Muthukumaran
Greenhorn

Joined: Oct 16, 2003
Posts: 11
I just want to creat a Proxy class for a another class. Can any one help me out.
Thank you
Muthu
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Are you saying you want to use the dynamic proxy stuff introduced in JDK 1.3, but use it under JDK 1.1.8? Because the relevant code has hooks into to the JVM's native libraries, this isn't something you can do directly. I imagine that you could (with effort!) create the bytecode representation of the proxy class you need, then load it; it's not going to be an easy thing to do, however. JDK 1.1 does have the java.lang.reflect package, so it's definitely possible.


[Jess in Action][AskingGoodQuestions]
Madi Muthukumaran
Greenhorn

Joined: Oct 16, 2003
Posts: 11
ThanX a lot for ur reply
I am not exactly sure that I have to use the Proxy class that what introduced in JDK1.3, but I will tell what I need to do, so if u can give me an idea to implement that.
I have to write a class that delegates all the operations on it to another class. I need to do this because only at run-time I will not the class that I have to use. So, the proxy class I am talking about have get the class name at run-time and needs to delegate all the operations invoked on it to other class got at run-time.
By the word operation I mean constructor, method class etc.,
 
GeeCON Prague 2014
 
subject: Dynamic Proxy class in JDK1.1.8