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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:54:41+00:00 2026-05-27T00:54:41+00:00

I expose my context : I have two Java programs that run on a

  • 0

I expose my context :

I have two Java programs that run on a unique Weblogic Server : program A and program B.
These ones are launched by two ksh :

programA.ksh and programB.ksh

Both need C.jar but in different versions (but with exactly the same package and classes) :

  • program A need C-1.0.jar
  • program B need C-2.0.jar

I precise that both programs share the same weblogic classpath.

So, my classpath contains in that order :

…..

C-1.0.jar

C-2.0.jar

…..

How can I do so that each program finds its good library ?

For instance, with my actual configuration, program B will always use C-1.0.jar instead of C-2.0.jar because of the priority position on classpath.

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

    If you launch two separate instances of the JVM for the two programs, then don’t use the same classpath! Isn’t that obvious?

    Are you perhaps using the CLASSPATH environment variable? That is a very old, outdated practice and you should not do it. use the -classpath command line parameter, that way you can easily use different classpaths for the two programs.

    Old answer:
    Assuming that you’re talking about threads rather than processes:

    The best solution would be to fix A, B or C so that both A and B can use the same version of C.

    Or, if the two versions of C actually have intentionally different behaviour, use a different package or class names for them.

    Only if you cannot change A, B or C should you consider the technical solution of writing a wrapper that uses different classloaders for A and B so that they will see different versions of C.

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

Sidebar

Related Questions

I have two separate installs of WebSphere. (Actually one is WebSphere Application Server V6.1
I have a repository class that wraps my LINQ to SQL Data Context. The
I have a simple HTML page that contains two tabs that show/hide content in
I have a current webpage that is broken into two sections. The top section
can't I expose my methods as webmethods in a winform and have other clients
I occasionally use a volatile instance variable in cases where I have two threads
Working with the MVVM pattern, I have a pair of view model classes that
I have a quartz job that needs to render a GSP, when I tried:
I have a WCF service that does some document conversions and returns the document
I have a WPF application that mostly follows MVVM, which I am trying to

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.