1 Reply Latest reply on Dec 1, 2013 8:40 AM by Wolf-Dieter Fink

    class loading order for jars in war

    sigma.wschung Newbie

      I am using a war file generated by a third party tool. In the generated war file, there is an generated jar file, says rd.jar,  the tool generates a class that has the same qualified name as another class, say, p.Lg,  in a fourth party jar file, says p.jar. According to the creator of the third party tool, this is the only way he can override the behavior of the fourth party library. He claims that his tool works because container usually load the jars in a war file in alphabetical order. This does not works in JBoss 7, not out of the box at least.

       

      In order to get the generated file to work in JBoss 7, I need to be able to control the order of the jar files(i.e. rd.jar before p.jar) in the class loading search path. I would like to know how much control one has in the class loading order of different jar files inside a war file. For example, does JBoss respect the order of Class-Path field in the manifest of the war file?