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 8343595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:06:52+00:00 2026-06-09T06:06:52+00:00

I am writing Plugin for some Application. Lets suppose that Application hava library dependency

  • 0

I am writing Plugin for some Application. Lets suppose that Application hava library dependency of libA-1.0 and my plugin has similar dependency of libA-2.0. There are different in versions and are not compatible each other (i.e. they have different api method signatures).

How to prevent my Plugin from loading classes from libA-1.0 (or how to force it to use classes from libA.2.0)?

Is there any way to do this not writing custom classloader and not using forName, loadClassDefinition calls?

The similar problem occurs when you put some libraries to *.war archive and they do not load becouse web containter has “the same” libraries on classpath.

Thaks for any help.

Regards,
Paweł

  • 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-06-09T06:06:54+00:00Added an answer on June 9, 2026 at 6:06 am

    OSGI provides this functionality out of the box. I’m sure there are some other plugin frameworks that provide similar functionality.

    There is a URLClassLoader which should be able to provide a lot of the functionality of loading classes from a different jar. You’ll have to put in some effort to change the class loader of the Threads that are doing the work. Don’t have an example on hand, would have to write one if you need a concrete example (unless you can find one with a search engine)

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

Sidebar

Related Questions

I'm writing an application that includes a plugin system in a different assembly. The
I'm writing some plugin code in a dll that is called by a host
I am writing a wordpress plugin that redirects the user. for some reason, wp_redirect
I am writing an application that supports plugins. Plugin creator is responsible for providing
I'm writing a plugin that needs some inflections of it's own. Using rails 2.3
I am writing an application that uses GWT, some Spring MVC and Spring Security.
I'm writing an application in groovy with grails that needs to do some automated
I'm writing a C# (ActiveX) plugin for an application that uses SetCompatibleTextRenderingDefault(true) (forces .net
I'm writing a plugin for Eclipse that collects some data from the project that's
I'm in the process of writing a jQuery plugin, and am getting into some

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.