Load java-party library of different versions of the method and apparatus

The invention discloses a method for loading different versions of a JAVA three-party library, which comprises the following steps of: A, building a boot managing unit for building a class load manager and module class loaders of modules so as to realize initiation of a JAVA application program before booting; and B, booting the JAVA application program in the boot managing unit, loading the class of the JAVA application program via the class load manager, and finding out a corresponding module class loader according to the character of the class of the module so as to realize the loading of the class of the module, wherein at least two modules have the same three-party library with different versions. The invention further discloses a device for loading different versions of the JAVA three-party library. The scheme of the invention can automatically appoint the three-party library with the needed version according to the need of the module, thus preventing version discrepancy of the three-party library.