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

  • SEARCH
  • Home
  • 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 6881001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:03:08+00:00 2026-05-27T05:03:08+00:00

I am writing a Java application that will load third party drivers. I intend

  • 0

I am writing a Java application that will load third party “drivers”. I intend to develop an interface that will define the required methods that the “driver” must implement in order to work within the application.

The intent is for the “driver” to be contained within a jar file. Then third party “driver” developers will be required to implement the interface.

As I’m trying to figure this out, I moved the “driver” code to a jar and found that I am having trouble since I have the interface defined in both the main application and in the jar file.

Is there a recommended way to implement this approach, or am I headed the wrong way?

j

  • 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-27T05:03:08+00:00Added an answer on May 27, 2026 at 5:03 am

    You basically define the interface once, e.g. in an API jar. This jar is then used by the main application as well as the driver.

    The driver library would then have this API jar as a dependency that is provided by the main application.

    In terms of Maven the dependency would have scope provided or compile for the library.

    Note that you should avoid having the same class twice in different libraries since those will most likely lead to class loading problems, class cast exceptions etc. (unless there’s some class loader scoping that isolates applications, like most application servers do).

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

Sidebar

Related Questions

I'm writing a Java application that will run for a long time (essentially, it
I'm writing a Java application that will have an on-screen number pad available for
I'm writing a .NET application that will make an RPC call to a Java
I am writing a distributed Java application that will make heavy use of networking,
I'm writing an application in Java that will upload a file up to AWS
I'm writing a Java application that will instantiate objects of a class to represent
I'm writing a small application in Java that will click ten different locations on
I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps
So I'm writing a Java application that uses Simple to store data as xml
I've got a Java application that I'm writing an installer for. We're using the

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.