Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
I read the article and got the examples working fairly easily, in I am using your RodentClassLoader class, including your Cat, Rodent and Mouse classes. When l use your java application and type: However when a convert the Cat class into a applet, l get the following error message: I believe that the Mouse class is being loaded correctly (as l recieve no error messages), but when l try the following statement, l receive the above error message. Rodent myToy = (Rodent) c.newInstance(); I am using the Java 2 development kit and my applet has the right to create a classloader and read files, so l don't think its a problem with security restrictions. My applet is in a jar file, which includes the Rodent class. The applet dynamically loads the Mouse class from another directory (which includes the Rodent class), but fails to cast the retrieved class to the Rodent class. I hope that you could shed some light on how l may solve this problem. Thank you Patrik Mihailescu.
Replies:
|
Sponsored Links
|