Dynamically load different versions of client jar

Hello,
My application needs to simultaneously support different versions of an RMI app. How to dynamically load the proper version of the client jar to connect with the same version of the server. Say Server versions are sv1.0, sv 1.1, sv 2.0 and clients are cl1.0, cl1.1, cl2.0. How to dyncamically load cl1.0 in my application so as to connect with sv1.0, similarly cl1.1 with sv1.1
Will having a different classloader for each of the client jars, solve the problem?
Can someone direct me/suggest on how to handle this.
I appreciate your help and thanks for your time.

Try this link if you want to see how browser based help will look on MACs and Apple hardware.
http://www.grainge.org/demos/bbair/
Your developers would need to create a sniffer to ascertain the OS of the user's device and then route to the required help. That is not built into RoboHelp and RoboHelp Server will not assist with this one.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge

Similar Messages

  • Load different versions of Help depending on user's OS?

    Is it possible to have different versions of Help load depending on the user's OS?
    For example, if a user is accessing from a PC then they would load the AIR Help version, but if they were accessing from a Mac then they would load the HTML version.
    Is this something that is handled on our database end, or would it be a feature of Adobe RoboHelp Server?

    Try this link if you want to see how browser based help will look on MACs and Apple hardware.
    http://www.grainge.org/demos/bbair/
    Your developers would need to create a sniffer to ascertain the OS of the user's device and then route to the required help. That is not built into RoboHelp and RoboHelp Server will not assist with this one.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Dynamically load the Version info from maven

    Hello,
    I am working on a project which is managed by maven.
    I want to load the version info marked in project.xml(conf file for maven) from my swing app.
    One way is to generate a class holding a static attribute indicating Version using maven.
    Anyone has some other suggestions?
    Thanks in advance

    Hello,
    I am working on a project which is managed by maven.
    I want to load the version info marked in project.xml(conf file for maven) from my swing app.
    One way is to generate a class holding a static attribute indicating Version using maven.
    Anyone has some other suggestions?
    Thanks in advance

  • Loading different versions of Linux native libraries - question

    I need to package libXm.so, libXm.so.2 and libXm.so.2.1 for a JWS application.
    Q: How do I use System.loadLibrary() to load libXm.so.2 and libXm.so.2.1 from within a JWS application?
    System.loadLibrary("Xm"); // loads libXm.so from root of JAR file.
    �yvind

    I dont like this either - its a last resort really :)The whole System.loadLibrary()/nativelib business is a bit ...
    I'm loading a library that might pull in libXm.so, libXm.so.2 or libXm.so.2.1. I don't have a way of telling which.
    AFAICT, I need to load all three of them. Thats 2MB/library.
    Hopefully loading libXm.so.* that are not used is at least harmless.
    I'm left with the feeling that although this might work, it is not the way it is intended to be done.
    �yvind

  • Dynamically loading client proxy no longer works

    I've got several instances where we need to dynamically load/initialize a WebService client proxy using a URL classloader all within an Applet. The need for the classloader and dynamic loading is due to the seperate jars holding different system modules. One main module can't possible know which submodules are also installed and have WebServices running.
    Instead, the main module reads the location of a class to load and uses a URL classloader to load that class. The loaded class knows about it's own client proxy to use and tries to load the appropriate jar and class. The proxy is successfully found and loaded using the classloader, but pukes during initialization. It appears the RuntimeModeler can't find the generated IsAvailable class even though it exists in the same signed jar that just got loaded and which contains the very client proxy that is trying to initialize itself.
    This process worked fine using 1.5, but no longer works after migrating to 1.6. Am I missing something obvious?
    Classloader: java.net.FactoryURLClassLoader@863cc1
    WebAppMgr.getServiceProxy -> b4 initialize
    class: com.irista.warehouse.webservice.wmscoredata.server.data.IsAvailable could not be found
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.getClass(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.processDocWrappedMethod(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.processMethod(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.processClass(Unknown Source)
         at com.sun.xml.internal.ws.modeler.RuntimeModeler.buildRuntimeModel(Unknown Source)
         at com.sun.xml.internal.ws.client.ServiceContextBuilder.processAnnotations(Unknown Source)
         at com.sun.xml.internal.ws.client.ServiceContextBuilder.completeServiceContext(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.processServiceContext(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Source)
         at javax.xml.ws.Service.getPort(Unknown Source)
         at com.irista.warehouse.webservice.wmscoredata.server.data.WmsCoreDataWS.getWarehouseCoreDataWSPort(WmsCoreDataWS.java:50)
         at com.irista.warehouse.webservice.wmscoredata.client.WmsCoreDataSvcProxy.initialize(WmsCoreDataSvcProxy.java:92)
         at com.irista.ui.webapp.framework.WebAppManager.getServiceProxy(WebAppManager.java:760)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.getCycleCountSets(CycleCountParameterPanel.java:309)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.refreshAction(CycleCountParameterPanel.java:236)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.preDisplay(CycleCountParameterPanel.java:225)
         at com.irista.warehouse.webapps.scheduling.CycleCountParameterPanel.initialize(CycleCountParameterPanel.java:149)
         at com.irista.foundation.webapps.scheduling.TaskTypeParameterPanel.createParameterPanel(TaskTypeParameterPanel.java:473)
         at com.irista.foundation.webapps.scheduling.TaskTypeParameterPanel.refreshAction(TaskTypeParameterPanel.java:147)
         at com.irista.foundation.webapps.scheduling.TaskTypeParameterPanel.preDisplay(TaskTypeParameterPanel.java:331)
         at com.irista.ui.webapp.framework.TabbedAppletPane.changePanel(TabbedAppletPane.java:311)
         at com.irista.ui.webapp.framework.TabbedAppletPane$TabbedChangeListener.stateChanged(TabbedAppletPane.java:385)
         at javax.swing.JTabbedPane.fireStateChanged(Unknown Source)
         at javax.swing.JTabbedPane$ModelListener.stateChanged(Unknown Source)
         at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source)
         at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source)
         at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source)
         at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

    Are you running SP2 R2? This worked for me as well until I upgraded to SCCM 2007 SP2 R2. I am focusing on the "~Doing Account Cleanup" errors in the ccm.log which should happen every 30 days, not every 20 minutes. Those errors have to be related to client push problems. Also, thanks for the reboot suggestion. I realize anytime a computer object is added to a domain security group that has is a member of a local group on the client, that a reboot is necessary on client systems in order to receive a new Kerberos access token but in the case of my test systems, I have explicitly added the computer account to the local administrators group so a reboot is not required. I have a test site in a completely different forest and it behaves almost the same way (doesn't run the "~Doing Account Cleanup" every 20 minutes) but still fails to install the client using the site server's computer account. Must be me!!!   

  • Loading different library versions

    Hi all,
    I'm developing an application that detects a specific hardware, then loads the jar file appropriate for that hardware version.
    My question is: How do I load multiple versions of a jar file in a single app? The idea is that the app spawns multiple threads. Each thread handles one hardware and uses the appropriate jar version.

    Why do you need separate jars for each version? Is the Java code different for each version, or just the native libraries?
    If it's Java code you're worried about and the jars do not overlap classes, there's no problem here.

  • Unresolved classes when loading WS client jar

    Hi,
      I'm loading a WS-callout client jar into an 11gR2 DB and running into some missing classes/interfaces (ORA-29521), eg javax.xml.ws.Service/WebServiceFeature. I've find articles stating that you would have to load the WS SOAP client stack but the dbws*.jar in jlib don't appear to contain those classes. Any pointers?
    If I'm to support 10g databases also, I assume that the same client won't work (even recompiled) since the 10g has a 1.4 JVM without annotation support etc, right?
    Thanks in advance,
    Nik

    Hello friend, try this:
    1. Connect to SYS
    2. Create a user to own the JAXB classes, running:
    grant connect, resource to jaxb
    identified by jaxb;
    exit
    Please note that JAXB username is not mandatory, any schema name is fine. Do not load it into the SYS schema. Only load it into the schema which will be referencing it.
    3. Load the xml.jar into the jaxb schema running the following command from the OS terminal window after the Oracle Home is correctly set:
    loadjava -resolve -v -user jaxb/jaxb $ORACLE_HOME/lib/xml.jar
    The following errors will be raised during the load:
    resolving: class oracle/xml/xsql/serializers/XSQLFOPSerializer
    errors : class oracle/xml/xsql/serializers/XSQLFOPSerializer
    ORA-29521: referenced name org/apache/fop/apps/Driver could not be found
    ORA-29521: referenced name org/apache/log/LogTarget could not be found
    ORA-29521: referenced name org/apache/log/output/NullOutputLogTarget could not be found
    ORA-29521: referenced name org/apache/log/Hierarchy could not be found
    ORA-29521: referenced name org/apache/log/Logger could not be found
    ORA-29521: referenced name org/apache/fop/messaging/MessageHandler could not be found
    Safely ignore them.
    4. Load your class or Jar file into the schema where JAXB classes have been imported, example:
    loadjava -resolve -v -user jaxb/jaxb JAXBTest.jar

  • Specifying the version of dependent jar file?

    Hi all
    At the moment I am fighting with some class loading issues in a J2EE Appcontainer... Acutally the app server uses a different version of a jar file than my application.. Now the classloader always uses
    the already loaded classes of the AppServers jar Version instead of those that I want..
    I have my application together with the dependent jar packaged together into one jar file... In the manifest I lsit the dependency...
    Now my question is if its possible to explicitly state the version of the package that my jar is dependent of...
    Any help would be appreciated
    regards
    tom

    Vijay
    Acutally I just read through the thread. Actually what I am working on is an J2EE App Containing a couple of EJB (2.0) components in different jars, some utility jars and 2 Wars. All this is packaged together into an ear.
    Now Actually the basic structure is like:
    Ear
    --> WAR1
    --> webinf containing classes and manifest with dependent jars
    --> War2
    --> EJB Jar
    --> metinf containing deployment desc and manifest where the manifest references JDom-b10.jar on the classpath
    --> Also conatiner JDom-b10.jar
    Acutally the JDom.jar is already loaded by the Application Server (Jboss 3.2.3) in its bootstrap loader... I need to have the b10 as otherwise some other 3rd Party stuff of the Ejb is not running...
    Now I expected the classloader to prefer the direct deployment unit against all parents and delegating loader... but it doesnt:
    15:17:04,011 INFO [STDOUT]
    org.jdom.Document(1bb8ea).ClassLoader=org.jboss.system.server.NoAnnotationURLClassLoader@e3b895
    ..org.jboss.system.server.NoAnnotationURLClassLoader@e3b895
    ..sun.misc.Launcher$AppClassLoader@e80a59
    ....file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/bin/
    ....file:/C:/Entwicklungstools/abaXX/components36/lib/3rdparty/oracle9iR2.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/lib/tools.jar
    ....file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/bin/run.jar
    ..sun.misc.Launcher$ExtClassLoader@1ff5ea7
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/dnsns.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/ldapsec.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/localedata.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/sunjce_provider.jar
    ++++CodeSource: (file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/lib/jdom.jar <no certificates>)
    Implemented Interfaces:
    ++interface java.io.Serializable(f62373)
    ++++ClassLoader: null
    ++++Null CodeSource
    ++interface java.lang.Cloneable(13e8d89)
    ++++ClassLoader: null
    ++++Null CodeSource
    This above is a small JBoss utility acutally printing out the watched URLs of the CL and the Codesource of a class... .. Now actually the classloader shouldn't use the Jdom.jar mentioned as source but the one listed here:
    15:16:24,308 INFO [EJBDeployer] nested deployment: file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/server/tebs/tmp/deploy/tmp27652tebs-0.1-SNAPSHOT.e
    ar-contents/tebs-migration-0.1-SNAPSHOT.jar-contents/jdom-b10.jar
    Actually I think the problem is pretty close to the thread you mentioned before... AFAIK the classloaders in J2EE Containers have to prefer the direct deployment unit (in this case the jar and its content) to any other parent class loaders files... I also thought that there can be mulitple versions of a class file in one VM an that the appserver has to preserve every app from using a class of another app... So that there is some housing principles....
    As I could not figure out how to solve this I came to the question regarding versioning... As both JDom.jars contain version information this would solve my probem... But as you already mentioned AFAIK there is only support to give some verision informationen about a jar in the manifest but nothing mentions that you can explicitely request a specific version.
    So If anyone has a clou how I get that crapp working I would be very thankful
    Tom

  • Add event listeners to dynamically loaded symbols?

    Hi,
    I'm trying to dynamically load different MovieClips based on user input. Several of those clips have embedded url link symbols. How can I add event listeners to the url links if the dynamically loaded MovieClip does not have an instance name? Seems like I can (right?) apply an instance name when the clip is loading, but the event listener doesn't compile because the name is not there yet, so that seems out.
    Am I on right track?

    Are you saying that you will instnatiate this symbol several times and each time url for this link is going to be different?
    There are at list two ways to deal with it.
    1. Inside symbol you can dispatch a custom event once it is clicked:
    myLink.addeventListener(MouseEvent.CLICK, onClick);
    function onClick(e:MouseEvent):void {
         dispatchEvent(new Event("linkClick"));
    Wherever you instantiate the symbol (perhaps on timeline):
    var symbolInstance:MySymbol = new MySymbol();
    symbolInstance.addEventListener("linkClick", onLinkClick);
    function onLinkClick(e:Event):void {
         // do whatever
    Second way would be to pass url value into symbol instance itself and deal with with it on a symbol level. I personally prefere way 1.

  • Can client dynamically link to shared libraries for different versions ?

    Can Oracle client dynamically link to Oracle shared libraries if the versions are different ?
    Hi:
    I apologize for this newbie question:
    We are using PRO C to generate the client C code.
    We can compile both dynamic and static versions of our Oracle client.
    Our question is:
    is it possible to compile a dynamically linked Oracle client in say version 10.1.0.2 and actually run the application against say version 8.1.7.0 environment ?
    That is, can an Oracle client dynamically link to the Oracle shared libraries if the versions are different ?
    If it is possible, then how to modify the makefile
    to enable Oracle client to reference different versions
    of shared libraries ?
    Thanks
    JL

    What you describe is not supported.

  • How to use two different versions of the same jar within one project

    Hi everybody!
    I have a big problem while integrating different web service clients within one bigger java project. Both implemetations need some jar files to work but demand different version. So, i would like to know if there is any way to tell which implementation should use which version! Anyhow i add those jars to the classpath makes working only one or the other webservice working but never both! Any ideas somebody?
    Best regrads,
    Stefan G�tz

    Of course do have the jar files different names but the classes inside of them are the same ... means that the standard system classloader can distinguish them. When you add a jar to a classpath the name actually dosent matter.... any other ideas, please?
    PD.: i tryed to add a manifest file to the one jar which makes use of one of the dublicated jars to specify which jar to take direcly but it makes no difference since once classes loaded they cant be distinguish ....see:
    http://java.sun.com/docs/books/tutorial/ext/basics/load.html

  • How to dynamically load jar files - limiting scope to that thread

    Dynamically loading jar files has been discussed a lot. I have read a quite a few posts, articles, and demo code for doing just that. However, I have yet to find a solution to my problem. Most people modify their system class loader and are happy. I have done that and was happy for a time. Occasionally, you will see reference to an application server or tomcat or some other large project that have successfully been able to load and unload jar files, allow for dynamic deployment of code, etc. However, I have not been able to achieve similar success; And my problem is much less complicated.
    I have an application that executes a thread to send a given file/message to a standard JMS Server Queue. Depending on the parameters selected by the user, this thread may need to communicate with one of a number of JMS Servers, ie. JBoss, WebLogic, EAServer, Glassfish, etc. All of which can be done with the same code, but each needs to load their own flavor of JMS Client Jar files. In this instance, spawning a separate JVM for each communication would work from a classloader perspective. However, I need to keep it in the family and run under the same JVM, albeit each JMS Server Connection will be created and maintained in separate Threads.
    I am close, I am doing the following...
    1. Creating a new URLClassLoader in the run() method of each thread.
    2. Set this threads contextClassLoader to the new URLClassLoader.
    3. Load the javax.jms.JMSException class with the URLClassLoader.loadClass() method.
    4. Create an initialContext object within this thread.
    Note: I read that the initialContext and subsequent conext lookup calls would use the Thread�s
    contextClassLoader for finding/loading classes.
    5. Perform context.lookup calls for a connectionFactory and Queue name.
    6. Create JMS Connection, etc. Send Message.
    Most of this seems to work. However, I am still getting a NoClassDefFoundError exception for the javax.jms.JMSException class ( Note step #3 - tried to cure unsuccessfully).
    If I include one of the JMS Client jar files ( ie wljmsclient.jar for weblogic ) in the classpath then it works for all the different JMS Servers, but I do not have confidence that each of the providers implemented these classes that now resolve the same way. It may work for now, but, I believe I am just lucky.
    Can anyone shine some light on this for me and all the others who have wanted to dynamically load classes/jar files on a per Thread basis?

    Thanks to everyone - I got it working!
    First, BenSchulz' s dumpClassLoader() method helped me to visualize the classLoader hierarchy. I am still not completely sure I understand why my initial class was always found by the systemClassLoader, but knowning that - was the step I needed to find the solution.
    Second, kdgregory suggested that I use a "glue class". I thought that I already was using a "glue class" because I did not have any JMSClient specific classes exposed to the rest of the application. They were all handled by my QueueAdmin class. However...
    The real problem turned out to be that my two isolating classes (the parent "MessageSender", and the child "QueueAdmin") were contained within the same jar file that was included in the classpath. This meant that no matter what I did the classes were loaded by the systemClassLoader. Isolating them in classes was just the first step. I had to remove them from my jar file and create another jar file just for those JMSClient specific classes. Then this jar file was only included int custom classLoader that I created when I wanted to instantiate a JMSClient session.
    I had to create an interface in the primary jar file that could be loaded by the systemClassLoader to provide the stubs for the individual methods that I needed to call in the MessageSender/QueueAdmin Classes. These JMSClient specific classes had to implement the interface so as to provide a relationship between the systemClassLoader classes and the custom classLoader classes.
    Finally, when I loaded and instantiated the JMSClient specific classes with the custom classLoader I had to cast them to the interface class in order to make the method calls necessary to send the messages to the individual JMS Servers.
    psuedu code/concept ....
    Primary Jar File   -  Included in ClassPath                                                      
    Class<?> cls = ClassLoader.loadClass( "JMSClient.MessageSender" )
    JMSClientInterface jmsClient = (JMSClientInterface) cls.newInstance()                            
    jmsClient.sendMessage()                                                                      
    JMSClient Jar File  -  Loaded by Custom ClassLoader Only
    MessageSender impliments Primary.JMSClientInterface{
        sendMessage() {
            Class<?> cls=ClassLoader.loadClass( "JMSClient.QueueAdmin" )
            QueueAdmin queueAdmin=(QueueAdmin) cls.newInstance()
            queueAdmin.JMSClientSpecificMethod()
        }

  • Dynamically load jar file

    Hi,
    I've got an applet (used in a website) which must internally load a jar (the jarname and mainclassname are stored in the database).
    with a lot of jars (more than 10) and slow-internet users of my applet, it is not an option to add all the jars to the archive-parameter within the applet:
    <APPLET
         CODE="my.mainClass.class"
         width="800"
         height="600"
         archive = "MyMainJar.jar,someOther.jar, another.jar, andAgain.jar, lastExample.jar"
         codebase="/javaclasses"
    >
    So, adding all the jars is not an option, because if a class of the last jar (in this example: lastExample.jar) is needed, all the other jars must be loaded first.
    I have tried it with a classloader, to load the jar, but i've got an AccessControlException:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkCreateClassLoader(Unknown Source)
         at java.lang.ClassLoader.<init>(Unknown Source)
    The question is: how can I dynamically (in an applet) open a jar, and create an instance of a class in that jar?
    I searched the internet, but google can't help me out.
    Regards,
    Thijs

    It shouldn't be that difficult; all the stuff you need to build jars is in java.util.jar.*.
    Essentially it's back to combining the jars you need into one big one, give a different name to each of the different combinations you might need. You'd probably have the composite jars stored, but when one was requested it would check the dates of the component jars and rebuild if needed.

  • Jars dependent on different versions of the another jar

    I have two vendor supplied jars that are both dependent on different releases of another jar. So, in the usage instructions for the first jar, it says to make sure that x_1_2_1.jar is my classpath. Likewise, in the usage instructions for my other jar, it says to make sure that x_2_0_1.jar is in my classpath. The installers for each one of these jar puts their version of the dependent x jar in a subdirectory under their installation.
    This causes all sorts of headaches because neither jar ever gets completely what it is looking for. Code in the jar that depends on x_1 fails if x_2 is in the classpath first, while code in the jar that depends on x_2 fails if x_1 is the classpath first.
    (Since, I'm sure to encounter this mismatched versioning problem with other "utility" jars in future, I'm intentionally withholding the actually names of the jars involved. I'm looking for the general solution to this class of problem, not specific tips related to a particular utilities jar.)
    I was thinking that maybe the manifest Class-Path of each jar might be used to force where each jar looks for it's dependent jars, but the documentation I read about Manifests indicated that each jars Class-Path is simply concatenated into the overall Classpath that the ClassLoader uses.
    If it matters, all this is in a Java 1.3.1 environment.
    It seems like I can't be the first person to come up against this, but I haven't really seen any traffic on the forums about this kind of problem. (Am I missing something obvious?)

    May be custom ClassLoaders may help you, but I am not sure. It depends on whether you are allowed to explicitly load several equally named classes from different sources.
    Probably it is allowed. The following is cited from the Java Language Specification, 2nd edition (chapter 7.7, Unique Package Names, packages.doc.html):
    "If unique package names are not used, then package name conflicts may arise far from the point of creation of either of the conflicting packages. This may create a situation that is difficult or impossible for the user or programmer to resolve. The class ClassLoader can be used to isolate packages with the same name from each other in those cases where the packages will have constrained interactions, but not in a way that is transparent to a na�ve program. "

  • Dynamically loading and registering JDBC driver from an archive (zip - jar)

    I'm programming an JDBC driver tester.
    I have to load dynamically any driver from an archive (jar or zip) after the user uploaded it.
    I think i did it well with my ClassLoader, i can get an instance of the driver and use any method like (getMinorVersion()) but when i registering it fail.
    There is no error but the driver is not registered.
    I rode the DriverManager log (with his logwriter) and he says :
    skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@5439fe]
    skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@2b7db1]
    (two times, it looks curious isn't it ?)
    This is a part of my code :
    Driver pilote = (Driver)Class.forName(driverClass.getName(), true,this).newInstance();
    System.out.println("Minor Version = "+ pilote.getMinorVersion());
    PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(System.out));
    DriverManager.setLogWriter(printwriter);
    DriverManager.registerDriver(pilote);
    System.out.println("Driver registered\n");

    I have made a simple test :
    public static void main(String[] param)
    System.out.println("Loading Driver from JAR ...");
    try
    File jar = new File("c://mbm//drivers//oracle.jar");
    URL aurl[] = {jar.toURL()};
    URLClassLoader urlclassloader = new URLClassLoader(aurl, ClassLoader.getSystemClassLoader());
    Class.forName("oracle.jdbc.driver.OracleDriver", true, urlclassloader);
    PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(System.out));
    DriverManager.setLogWriter(printwriter);
    Enumeration listDriver = DriverManager.getDrivers();
    System.out.println("[---------Drivers-----------]");
    while (listDriver.hasMoreElements())
    Driver driver = (Driver) listDriver.nextElement();
    System.out.println("->> "+driver.getClass().getName());
    catch (MalformedURLException e)
    e.printStackTrace();
    catch (ClassNotFoundException e)
    e.printStackTrace();
    This displays that :
    Loading Driver from JAR ...
    skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@9ec21d67]
    [---------Drivers-----------]
    D:\www\tomcat\webapps\mbm\WEB-INF\classes>
    I think there is in this case only one instance

Maybe you are looking for

  • No message tone or icon after software update

    I did a software update yesterday to the 10.2.1.2102 and now when i receive a text my phone doesnt notify me of this. No tone goes off and no icon appears. HELP!

  • Use of MEASURES dimension in a RUNALLOCATION in a script logic

    Hi everybody, We are trying to use MEASURES dimension inside a RUNALLOCATION in a script logic, because we need to work with the information at a YTD element Example: It works: *XDIM_MEMBERSET C_CATEGORY=%C_CATEGORY_SET% *XDIM_MEMBERSET TIEMPO=%TIEMP

  • Group By Statement

    Hello, I am new to SQL so I apologise. I need to execute the following query on my Oracle 10g database: I have a table like this: OID             Truck    Loading Time        Timestamp 1 HT01 10 10:01 2 HT02 8 09:03 4 HT02 6 10:04 5 HT01 10 11:01 8 H

  • Problème d'installation d'Adobe Flash Player

    Bonjour, Je ne peux pas installer adobe flash player, car la barre de progression se bloque à 50%. Il y a un message qui s'affiche, m'indiquant que j'ai la page internet ouverte, cependant ce n'est pas le cas. Je clique sur ressayer, et le message s'

  • Creating New Sub-Folders on Inbox when connected to Exchange 2007

    I am trying to figure out how I can add/create a new sub folder to my main Inbox using Mail 4.2 (1078)in Snow Leopard.I was able to do this in Entourage 2008 but can not seem to be able to do the same with Mail 4.2. Any help or clarification here wou