tsds
tsds

Reputation: 9020

How classloader loads and unloads static classes?

I'm writing a plugin to 3-rd party server application.
I'd like to know how usually java classloaders reload static classes?

Could anyone suggest a good doc that explains java classloading in details?

Upvotes: 1

Views: 333

Answers (1)

Peter Lawrey
Peter Lawrey

Reputation: 533492

Static members of classes are not reloaded. (I assume you are not talking about static inner classes)

Instead static members are unloaded when a classloader is unloaded. When a new classloader is loaded (with the same or similar code) static members are lazy loaded.

Upvotes: 1

Related Questions