Can I dynamically unload and reload (other versions of the same) JAR?

前端 未结 6 789
北恋
北恋 2020-12-05 07:40

I am writing a server program which is used to run unit tests of an API (displaying lots of information and providing web access to control / monitor the whole thing)...<

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 08:35

    OSGi is a framework that will allow you to do it. JSR 277 the Java Module System is designed for doing that as well (I think). I have not followed the OSGi -vs- JSR 277 debate, so I don't know f they are trying to marge them at all.

    You can roll your own with class loaders, but it'll be less "fun".

提交回复
热议问题