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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:51:00+00:00 2026-05-23T13:51:00+00:00

I have 2 versions of jar file (plugins1.0.jar and plugins2.0,jar) in same folder and

  • 0

I have 2 versions of jar file (plugins1.0.jar and plugins2.0,jar) in same folder and trying to load Class from these jar files dynamically using URLClassloader.
I want to ensure that the class should be loaded from latest version of jar file.

How can i achieve this ?

Thanks in advance

  • 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-23T13:51:00+00:00Added an answer on May 23, 2026 at 1:51 pm

    You will need to construct your list of urls in such a way that plugins2.0.jar occurs before plugins1.0.jar. But generally it’s a bad idea as other classes may have conflicting versions loaded.

    From Java docs

    The URLs will be searched in the order
    specified for classes and resources
    after first searching in the parent
    class loader.

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

Sidebar

Related Questions

I have java class files and property files in the same directory. src/main/java/com/berlin/Test.class src/main/java/com/berlin/Test.properties
I have a list of jar files, all containing slightly different versions of the
Is it possible to have both versions of maven running on the same computer?
This is probably an easy question... I have 4 source versions of the same
I have a Maven project which generates a 413.06 KB jar file. I have
I have a used the maven assembly plugin to create multiple jar from one
I have hundreds of jar files scattered across different projects that I need to
Problem: I'd like to specify the main class in a jar file that I
I have following web-fragment.xml in a jar file, under META-INF/ It seems I cannot
I have an SWT application that I'm trying to create a runnable .jar for;

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.