Openfire should load jars in a predictable order

Description

https://github.com/igniterealtime/Openfire/pull/737

We had some patches in a jar in the lib folder and the jar was named something like aaa_patches.jar so that it would override classes in openfire.jar. This worked sometimes but it wasn't consistent across installations despite using the same versions of Java and the same OS. Files.listFiles() doesn't make any promises about the order it will return files in. (This patch sorts the list of jars so that the order is consistent across installations on the same platform (unix or windows, or everywhere if you don't have jars with mixed case filenames).

Environment

None
Fixed

Assignee

Dave Cridland

Reporter

Daryl Herzmann