M
Matthijs Blaas
Hi!
I have an applet that loaded another class from the same classpath:
Class clas = Class.forName("Classfile");
sub = (Applet)clas.newInstance();
Now I want to load a class file thats not in the same directory, the only
way I'm able to do this is by making a urlconnection to the class file,
retrieving all the bytes from this classfile using a getInputStream and then
define the class file using the defineClass method.
Is there another way to instantiate class files not in the same
directory/url than the instantiating applet? And how could this be done for
jar files?
Thanks in advance!
Matthijs
I have an applet that loaded another class from the same classpath:
Class clas = Class.forName("Classfile");
sub = (Applet)clas.newInstance();
Now I want to load a class file thats not in the same directory, the only
way I'm able to do this is by making a urlconnection to the class file,
retrieving all the bytes from this classfile using a getInputStream and then
define the class file using the defineClass method.
Is there another way to instantiate class files not in the same
directory/url than the instantiating applet? And how could this be done for
jar files?
Thanks in advance!
Matthijs