简体   繁体   中英

Websphere alphabetical order

I need my web application load the libs in alphabetical order, I Know there is an environment entry to this cause, something like ALPHABETICAL ORDER.

I need libs load in alphabetical order ascending

This can be done with a JVM custom property, as documented at https://www.ibm.com/support/pages/specifying-order-web-inflib-jar-files-class-path-websphere-application-server-traditional

For what it's worth... if you are reliant on the order of the class path in order for your application to function properly, that's a sign that your application is poorly packaged. There is no technical way to utilize multiple versions of a class within a single class loader, so if you have duplicate copies of some class in your application, you should take action to eliminate those duplicates. If there's only one of everything in the class path, then the order won't matter, and your application will be portable regardless of how the application server happens to order unsorted jars from a directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM