redefining scripted classes

Jonathan Edwards <[email protected]>
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
Happy new beanshell year!

In 2.0b-1, attempting to redefine a scripted class throws 
"java.lang.LinkageError: duplicate class definition". Unfortunately the 
"HotSwap" capability in Java 1.4 is only available via the debug API, 
not reflectively. Anyway I believe it currently only works if you don't 
change the set of class member names. In the case that the scripted 
class uses the same members and types as before, couldn't the existing 
loaded class be re-used, as it is just a delegator?

In the general case of arbitrary changes to the scripted class, I 
presume something like the reloadClasses command could be used, 
appending to a chain of class loaders on each redefine.

Am I on the right track here?

Jonathan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.