dcsimg
Loading class from the ".class" file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Zdenek_Mojzis
Posted On:   Tuesday, August 7, 2001 12:45 AM

Hi!
How can I load a class into JVM and use it?
The class could be any ".class" file.
Thanks for help.

Re: Loading class from the ".class" file

Posted By:   Luigi_Viggiano  
Posted On:   Tuesday, August 7, 2001 12:50 AM

Try with Class.forName("package.ClassName"); the class must be accessible from classpath. If you want to know how to make a Class in memory from a byte stream (i.e. read from file) check ClassLoader source code from the JDK sources downloadable from java.sun.com.
About | Sitemap | Contact