Best approach to dynamically load modules (classes) in Java

前端 未结 3 2211
南方客
南方客 2021-02-09 12:10

I\'m currently writing an application that requires to operate on different type of devices. My approach would be to make a \"modular\" application that can dynamically load dif

3条回答
  •  一生所求
    2021-02-09 12:41

    It sounds like you might want to use the ServicerLoader interface, which has been available since Java 6. However, bear in mind that, if you want to use Spring dependency injection, this is probably not what you want.

提交回复
热议问题