How to create a pluginable Java program?

后端 未结 6 1835
粉色の甜心
粉色の甜心 2020-12-12 13:48

I want to create a Java program that can be extended with plugins. How can I do that and where should I look for?

I have a set of interfaces that the plugin must imp

6条回答
  •  渐次进展
    2020-12-12 14:40

    At the home-grown classloader approach: While its definitely a good way to learn about classloaders there is something called "classloader hell", mostly known by people who wrestled with it when it comes to use in bigger projects. Conflicting classes are easy to introduce and hard to solve.

    And there is a good reason why eclipse made the move to OSGi years ago. So, if its more then a pet project, take a serious look into OSGi. Its worth looking at. You'll learn about classloaders PLUS an emerging technolgy standard.

提交回复
热议问题