// Create the ServiceLoader for a CustomerService ServiceLoader sl = ServiceLoader.load(CustomerService.class); // Use first implementation CustomerService service = sl.iterator().next(); set customer = service.search("Tux*");