jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: injecting code into java.* classes
Date Mon, 12 Aug 2002 17:35:56 GMT
Hi,
You can use reflection to call private
methods(java.lang.reflect.AccessibleObject), or to try find
some better solutions for problems.


> Hi
>
> [...]
> > This took care of the security exception and it returned a
> > Class object. However, when I tried to instantiate the URL
> > object, I get this error:
> > java.lang.IllegalAccessError: try to access method
> > java.net.URLStreamHandler.parseURL(Ljava/net/URL;Ljava/lang/St
> > ring;II)V from class java.net.URL at
> > java.net.URL.<init>(URL.java:145) at
> > java.net.URL.<init>(URL.java:76) at
> > java.net.URL.<init>(URL.java:70) at
> > net.nvisionsoftware.DynamicJavaMon.gui.T2.main(T2.java:30)
> >
> > Any idea what's going on or how I can actually inject code
> > into java.* classes? Thanks,
> I suppose wrong classloader!
> The class your code wants to access was loaded by the system
> classloader.
> Which means it isn't in the same namespace and therefore it isn't
> allowed to access these members.
>
> Btw, I really hope there is no way to inject such code, during runtime.
>
> Peter
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:bcel-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:bcel-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:bcel-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-user-help@jakarta.apache.org>


Mime
View raw message