Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Programmer > Re: A problem a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 52642 of 55512
Post > Topic >>

Re: A problem about proxies

by Steven Simpson <ss@[EMAIL PROTECTED] > May 11, 2008 at 09:42 AM

ZelluX wrote:
> im****t java.lang.reflect.*;
>   
>         Object proxy = Proxy.newProxyInstance(null, interfaces,
handler);
>
> But when i ran this Test program, it throws an exception
> Exception in thread "main" java.lang.IllegalArgumentException:
> interface MyInterface is not visible from class loader
>         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
>         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
>         at Test.main(Test.java:9)
>   

You specified null as the class loader.  Perhaps try 
ClassLoader.getSystemClassLoader()?

-- 
ss at comp dot lancs dot ac dot uk                                     |
 




 5 Posts in Topic:
A problem about proxies
ZelluX <zellux@[EMAIL   2008-05-10 21:24:28 
Re: A problem about proxies
Steven Simpson <ss@[EM  2008-05-11 09:42:10 
Re: A problem about proxies
ZelluX <zellux@[EMAIL   2008-05-11 03:14:01 
Re: A problem about proxies
Roedy Green <see_websi  2008-05-11 11:56:52 
Re: A problem about proxies
Roedy Green <see_websi  2008-05-11 11:51:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 14:16:55 CST 2008.