The Artima Developer Community

Legacy Design Forum
Designing with Dynamic Extension

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

reloading of class

Posted by Manohar on January 24, 2002 at 11:01 PM

I have written a code for reloading of classes. What might be the problem here :

ClassLoaderForDotClass tcl = null;
Class className;
Method methods[];

try
{
/* Load the classloader */
tcl = new ClassLoaderForDotClass();
className = tcl.loadClass(fileName);
methods[] ...
fields[]...
constructors...
}
catch(Exception e)
{ System.out.println(e);}

sClassName = className.getName();
tcl = null;
className = null;
methods = null;
constructors = null;
fields = null;

where the class 'ClassLoaderForDotClass' is similar to the class
'GreeterClassLoader' given in http://www.artima.com/insidejvm/ed2/ch08TheLinkingModelPrint.html



Replies:

Sponsored Links




Google
  Web Artima.com   
Copyright © 1996-2007 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us