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:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
