• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ServiceLoader API

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi together,

try to build up a little application with a small plugin-concept (not enough for osgi etc.). so i use the ServiceLoad API.

In eclipse i set up a project and add 2 implementations of the services (with the needed Interface-Implementation and META-INF/Service/file) to the projects lib folder and the classpath.
TestCoding like this:



Worked fine in eclipse.

Than i build up an jar of theses files, and update the manifest file to set the correct classpath:


the programm still works, even if code some references to the load-method above (so: the classpath is set correct) But the ServiceLoader didn't recognize an Service?

Is there any Problem for the ServiceLoader to recognize Service-Implementations from the packed jar?

Hope somebody can help.
Thanks a lot
Dom
 
reply
    Bookmark Topic Watch Topic
  • New Topic