Reputation: 18861
I need to perform following steps:
ToolProvider.getSystemJavaCompiler()
and created .class fileThanks for help!
Upvotes: 5
Views: 177
Reputation: 24375
What you need to do is write your own ClassLoader that will load the classes you have just compiled.
There are many examples on the web on how to do that.
Here is one to load from the web: http://kazi-masudul-alam.blogspot.com/2008/01/java-classloader.html
Upvotes: 1
Reputation: 597046
Use a URLClassLoader
to load the classes. Then you can use reflection to instantiate and manipulate them.
Upvotes: 5