File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Getting Methods using URLClassLoader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting Methods using URLClassLoader" Watch "Getting Methods using URLClassLoader" New topic

Getting Methods using URLClassLoader

Andy Peter

Joined: Feb 12, 2002
Posts: 12
If I use URLClassLoader to load a class then do I need all other dependent jars in the classpath to invoke the class.getDeclaredMethods()? would it be throwing an exception if I don't include the jars, that my class is dependent on, in the classpath.
Thomas Smets
Ranch Hand

Joined: Dec 11, 2001
Posts: 111
could you reformulate ?
I really don't understand what you want !

Thomas Smets
Just another developper
Steve Deadsea
Ranch Hand

Joined: Dec 03, 2001
Posts: 125
It would most likely throw a ClassNotFoundException if the jar files that contain the classes are not present.
I agree. Here's the link:
subject: Getting Methods using URLClassLoader
It's not a secret anymore!