Unloading classes in java?

前端 未结 7 1621
遥遥无期
遥遥无期 2020-11-22 01:40

I have a custom class loader so that a desktop application can dynamically start loading classes from an AppServer I need to talk to. We did this since the amount of jars th

相关标签:
7条回答
  • 2020-11-22 02:17

    Classloaders can be a tricky problem. You can especially run into problems if you're using multiple classloaders and don't have their interactions clearly and rigorously defined. I think in order to actually be able to unload a class youlre going go have to remove all references to any classes(and their instances) you're trying to unload.

    Most people needing to do this type of thing end up using OSGi. OSGi is really powerful and surprisingly lightweight and easy to use,

    0 讨论(0)
提交回复
热议问题