开发者

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

开发者 https://www.devze.com 2022-12-19 17:35 出处:网络
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 classloa

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

精彩评论

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

关注公众号