Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Per package libraries in eclipse java

Options
  • 23-01-2010 2:33pm
    #1
    Registered Users Posts: 427 ✭✭


    Hi,

    I have an eclipse project with two packages in it. Each package contains a class (classA and classB) and these classes reference two different versions of the same library.

    java.packageone
    -classA

    java.packagetwo
    -classB

    referenced libraries:

    The packages are stored in 2 jars:
    JarV1

    java.library
    -classX

    JarV2

    java.library
    -classX

    Notice the duplication of classX. Unfortunately only the newest version is loaded and one of my packages does not work.
    The naming of the packages is the same in the jars so there is a conflict.

    So how do I fix this?
    Thanks!


Comments

  • Registered Users Posts: 427 ✭✭Kevo


    I really need to solve this problem so any pointers at all would be much appreciated.

    I've been looking into manually using the classloader to ensure that the right class gets loaded but I'm having trouble due the structure of my actual program (you might have guessed that this isn't my real prog). Does this seem like a good course of action to you guys? Excuse my ignorance, I'm rather new to classloader stuff.
    Thanks.


  • Registered Users Posts: 1,821 ✭✭✭Skud


    can you not just build the classes separately?

    if not then either make your own class loader or have a look at osgi


Advertisement