why do we need user defined classloader in java

后端 未结 3 896
感动是毒
感动是毒 2021-01-05 08:45

why tomcat has its own classloader. what is the advantage of having user defined classloader

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-05 09:46

    I worked on a system once that had a classloader that loaded classes from a distributed DB. That way you could modify your code, compile it and have the compiler dump it to the DB, then anyone who restarted their system would have it load immediately (this was for clients on a distributed client/server system where admins could create their own screen modules on the fly and push them out to the clients).

    This had issues by the way, great theory but I can't recommend it.

提交回复
热议问题