How to allow the classloader to load classes from a changed jar?
问题 We have a server side Java6 app running on quite a few linux servers. Occasionally, someone will accidentally upgrade the jar file while the application is running. When that happens, the next attempt to load a class that hasn't been used yet (often the ShutdownHandler code) fails with a ClassNotFoundException. I would like to tell the classloader that it is ok to read the changed jar file to get the classes it needs. I don't mind if this results in the classloader re-reading already loaded