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 Dynamic class loading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Dynamic class loading " Watch "Dynamic class loading " New topic

Dynamic class loading

Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
Ok. here is my problem

Please note the commented code snippet. I would like to dynamically load a class and pass it as an argument to the displayDocument() method.


is not valid, as they are incompatible conditional operand types. How do I get around this?

P.S: Interestingly, c.getInterfaces() returns an empty array (I expected it to return DocumentProviderIntf).

[ June 28, 2006: Message edited by: Lynette Dawson ]
[ June 28, 2006: Message edited by: Lynette Dawson ]

MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Lionel Port

Joined: Sep 14, 2002
Posts: 19
You only have the Class. You need to create an instance of the class.

I agree. Here's the link:
subject: Dynamic class loading
Similar Threads
A decent text editor for windows
JTextField - display dd/mm/yyyy
how to avoid synchronization problem in webpage
Delay while I type characters in the text box