I would like to know if there is a possibility to create new classes and make use of them during the runtime of an application. I have heard about Java Reflection API, can it be used to solve my problem ?
Java reflection api is used for creating objects at rumtime , but the classes should be already available.It cannot create classes at runtime.It can load class , instantiate object and other related stuffs.
Thanks everybody. I'll look into those scripting languages. I wanted to know if there is a possibility to dynamically extend a Java program. [ August 27, 2007: Message edited by: Yohan Liyanage ]
Joined: Mar 22, 2005
I've found the Javassist library very useful for this. Since it creates real Java classes, I'd think it would be much faster that anything that involves a scripting language (assuming that those are essentially interpreted, not compiled to bytecode).