Class path problem of Java – jar file
I have a Commons httpclient Jar classpath problem
The application uses a newer version of Commons httpclient Jar, which is commons-httpclient-3.0 1.jar.
After JBoss is installed, it will install in two different directories called commons - httpclient The original version of jar
/opt/appname/lib and /opt/appname/server/default/lib
It's easy to simply delete them, but it turns out that they are being used by another application on the system I wonder if there is any way to specify an order of using classes, for example
First, use commons-httpclient-3.0 1. Jar and then use commons - httpclient. Jar jar
Quite new Java, so any help will be appreciated
Solution
I believe that the only way to perform this operation under the restrictions you mentioned is to move the correct jar to the server / default / lib folder of each application on JBoss and delete it from / opt / appName / lib
In other words, this may still be a problem, because JBoss itself may also need jars In this case, you may fail
As a side note, you can create a folder / JBoss / lib / endorsed LIBS placed there take precedence over JBoss / lib