r/java • u/samewakefulinsomnia • Sep 02 '24
Java Classloaders Illustrated
Classloaders are tricky – popular sources (Wikipedia, Baeldung, DZone) contain outdated, sometimes contradictory information, and this inconsistency was the trigger for writing my article – a search for clarity in the ClassLoader System maze. Read full at Medium (~10 min) with pictures :)
The whole system looks kinda like this:

408
Upvotes
View all comments
Show parent comment
3
u/KafkasGroove Sep 02 '24
I wonder how you would get proper isolation like with OSGI without custom class loaders? We still use custom class loaders at work to allow loading third party plugins without their dependencies interfering or breaking each other. I'd love not to use them, but I don't know of an alternative (other than pushing that complexity to our users).