Moritz Hammer wrote:
> Maybe a cleaner solution than using an "unlikely"
> signature - I used "DIFFZIFF" ;-) If not.defined.Anywhere is not put
into
> the bootstrap classpath, the instrumented ClassLoader subclass gets
> screwed, since it requires a loaded instance of not.defined.Anywhere to
> get started, and this leads to very strange errors.
I'm probably misunderstanding you, but I don't see why you'd have to load
class
not.defined.Anywhere at all -- there's no need to create an instance just
to
call a method with that signature. I was able to call my additional
Object
constuctor with bytecode:
new java/lang/Object
aconst_null
invokespecial java/lang/Object/<init> ([Lnot/defined/Anywhere;)V
Which worked, in that my constuctor was called, but of course I had
nothing
comparable to your custom classloader in my test settup.
-- chris


|