开发者

Apache Commons JCI ReloadingClassLoader

Does anyone have any experience in using the ReloadingClassLoader of the Apache Commons JCI开发者_运维技巧 API?

The only usage example can found in the following page: http://commons.apache.org/jci/usage.html

I am assuming that whenever the directory or jar changes, it will automatically reload the classes within the classloader?

If so, you would have to load/instantiate a previously loaded/instantiated class (by calling loadClass()) again to use the newly modified class? Is that correct?

Hope this is clear.


http://commons.apache.org/jci/apidocs/org/apache/commons/jci/ReloadingClassLoader.html - According to the minimal documentation here, you need to call loadClass explicitly and if the underlying Resource has changed, then it will give you the new image of the Class instead of the old one.

It will be useful to checkout the code since the documentation is not very extensive on this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜