Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: plugin architecture Date: Fri, 22 Jul 2016 23:50:11 -0400 Organization: Aioe.org NNTP Server Lines: 28 Message-ID: References: NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:35104 On 7/20/2016 2:29 AM, Philipp Kraus wrote: > I'm searching for an indea for a plugin architecture. I have found > PF4J, OOGI and JPF. What about using what is in Java SE aka ServiceLoader (see http://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html). Or do what a lot of people are doing: just use Spring to load the plugin. Or do you really need some advanced features with versioning, dependencies, unload etc.? > At the moment I have got a question: Is it a good idea, > that one Jar file store multiple plugins or is it better that one > plugin is represent by one Jar file. One plugin per jar. > Another question is because I'm using Google Guava and there exists a > reflection API, so I can iterate over all classes within a package. > IMHO I can use this reflection to load my plugin. Is this a good > choice? Direct reflection is probably too much a reinventing the wheel framework. Arne