Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 968919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:33:34+00:00 2026-05-16T02:33:34+00:00

I am writing a web app in Eclipse. I am trying to use the

  • 0

I am writing a web app in Eclipse.

I am trying to use the ServiceLoader class to load some plugins.

The docs for ServiceLoader say I need to place a file in META-INF/services.

I have placed the file in the WebContent/META-INF/service folder but when I run the JUnit test via Eclipse it does not find any plugins.

Is this the correct location for the file?

Also, how can I get more debug info from ServiceLoader such as the folders it is searching for the file in?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:33:35+00:00Added an answer on May 16, 2026 at 2:33 am

    The META-INF/services should be at the root of the jar file or resource directory in the classpath of the classloader used to locate plugins.

    If you have a web application, then you can have directory structure like:

    <webappname>/WEB-INF/classes/META-INF/services
    

    But the ideal way is to have it in your plugin’s jar file. E.g if you have a plugin bundled as WEB-INF/lib/myplugin.jar, and your plugin class is com.example.plugin.MyPlugin Then the jar should have a structure:

    myplugin.jar!/META-INF/services/com.example.plugin.MyPlugin
    

    Having done that, you can get a service loader using your web application’s class loader

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a basic web app, this has some list elements that I
I'm writing a web app that points to external links. I'm looking to create
I am writing a web app using TurboGears, and in that app the users
I'm writing a web app (Java) which allows users to select contacts. The contacts
I am writing a web app in PHP, and it has come time to
I am writing a simple web app using Linq to Sql as my datalayer
I'm writing a little web app with webpy, and I'm wondering if anyone has
In a web-app I'm writing, the user is supposed to enter the path in
We're writing an asp.net web app on IIS 6 and are planning on storing
I've been writing a few web services for a .net app, now I'm ready

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.