开发者

Is there a way to load classes jars and packages on run time?

I want to know if there is a way to load classes and jars on r开发者_如何学JAVAuntime?


Absolutely - create an appropriate ClassLoader instance, e.g. using URLClassLoader. You can then ask that classloader to load classes etc.

If you can give more information about exactly what you're trying to do, we can possibly help to provide more details or sample code.


Ya you can do it using Custom class loader. And this is what is used for Hot Deployment, That is loading classes at runtime.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜