Samples JDK
Test.java
1 package com.freemindcafe.designpatterns.serviceloader;
2 
3 import java.util.ServiceLoader;
4 
5 public class Test {
6 
7  public static void main(String[] args) {
8  ServiceLoader<ICepEngine> serviceLoader = ServiceLoader.load(ICepEngine.class);
9  for (ICepEngine cepEngine : serviceLoader) {
10  cepEngine.echo();
11  }
12  }
13 
14 }