开发者

What happens if a Jar is updated while it is still being used by a JVM?

I know that, under typical conditions, a class is only loaded once. I also know that classes are immutable. Thus, once the class is loaded, it cannot be changed unless it is reloaded (which typically doesn't happen).

Does the same thing hold true for Jars? What happens if a Jar is updated whi开发者_高级运维le a JVM is still running that had previously loaded classes from the Jar?


Nothing, if a class in that jar is used, the same definition remains, if a new class is loaded in the updated jar it will be taken.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜