I want to share a jar file for two war in the same instance.
For test, I make the jboss folder and war file like this.
1)JBoss Folder
server/default
-- deploy/
-- myApp.war
-- lib/
-- test_1.2.jar(only one method to output "1.2")
2)WAR
myApp.war
-- META-INF/
-- WEB-INF/
-- class/
-- myservlet(reference class test to output the version)
-- lib/
-- test_1.1.jar(only one method to output "1.1")
I hope the shared library could override the jar file in WAR,
but i still get the version "1.1".
it means that the jar file in WAR worked, but not the jar in the "server/default/lib".
I Know,
I need to set <class-loading java2ClassLoadingCompliance="true"> to change the ClassLoader.