How to load JAR files dynamically at Runtime?

前端 未结 20 3252
伪装坚强ぢ
伪装坚强ぢ 2020-11-21 05:15

Why is it so hard to do this in Java? If you want to have any kind of module system you need to be able to load JAR files dynamically. I\'m told there\'s a way of doing it b

20条回答
  •  旧巷少年郎
    2020-11-21 05:56

    I personally find that java.util.ServiceLoader does the job pretty well. You can get an example here.

提交回复
热议问题