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

The Archive Base Latest Questions

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

related: manage conflict on java classpath also related: Java Classloader – how to reference

  • 0

related: manage conflict on java classpath

also related: Java Classloader – how to reference different versions of a jar

I have two jar files in my which in each own has it own dependency included in jar file but both of them is in different version.

a.jar -> has c.class/c2.class/c3.class/.. version 0.3 in it

b.jar -> has c.class/c2.class/c3.class/.. version 1.0 in it

But when I tried to use both of them in the same project. It seems like it only use c.class from one jar but not another. This turn out to be a problem since API is very different in both version. Is there anyway to tell them to use a c.class just from its respective jar ? I can’t modified a.jar and b.jar here.

btw. After quick search it seems like people suggest OSGI and classloader but I know next to nothing about it which should be the quickest way to deal with it ? (already read a little bit about classloader but still not sure how to use it).

EDIT: I prefer to use original library they bundle with since I already evaluated those two jar separately (they are text mining tools with same back-end but the version is very different). Now I want to integrate both of them into one and try to make the environment close to original as possible.
Right now I follow Travis Webb’s solution but I still wonder why the jar don’t separate both set of library.

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

    Quickest way:

    Extract a.jar, delete the stuff you don’t want, and re-jar it. A JAR is identical to a zip file, which means you can just create a normal zip file and rename it to a .jar.

    btw, this is not your fault. Whoever you got those jars from are idiots, because they included external dependencies in with their releases, and they aren’t supposed to do that.

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

Sidebar

Related Questions

I searched for a long time, but I don't manage to retrieve two related
I have two closely related sites, a main site and a mobile site, hosted
I have gone to admin -> manage product -> product information page -> related
I have a question related to navigation between different activities and onPause and onRestore
Related to https://stackoverflow.com/questions/139944/where-can-one-find-free-software-icons-images I have a need for free weather-related icons. Specifically, I need
Related to: Query Windows Search from Java But this time to use OSX's spotlight
Related Using SO as an example, what is the most sensible way to manage
I have a question related to Eclipse PDE development. I'm using target definitions to
In Django, when I run manage.py test, I get a lot of authentication related
I have several related questions and post under one topic for clarity's sake. #

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.