Unlock instant, AI-driven research and patent intelligence for your innovation.

Java EE application class loading conflict analyzing method and device

A technology of applying class loader and conflict analysis, applied in the direction of program control device, program loading/starting, instrument, etc., can solve the problems of type incompatibility, Java program running error, inability to guarantee, etc., to improve stability and avoid running wrong effect

Active Publication Date: 2015-06-10
BEIJING TONGTECH CO LTD
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] 1) Since the same class will only be loaded once, if there are classes with the same full class name in different jar files in the class path of the JavaEE application, it cannot be guaranteed that the expected class can be loaded, which will cause Java programs to run incorrectly , for example, for multiple versions of a jar file in the classpath of a JavaEE application, loading an incorrect version will cause the program to run incorrectly
[0008] 2) Since the caches of loaded classes managed by different class loaders are not visible to other class loaders, the same class may be loaded multiple times. For example, the class loader of a JavaEE application uses sub-priority classes Loading, that is, when loading a class, it is loaded from its own class path first, and if it can be loaded, it will be loaded, and it happens that the parent class loader has already loaded this class, which means that the same class is used multiple times by multiple class loaders The phenomenon of loading, but in the JVM, the classes loaded by different class loaders are considered to be different classes, that is, the types of these classes are incompatible, which makes the program run incorrectly in operations such as type conversion
[0009] 3) Since the JVM does not immediately load all the classes in the class path, but loads them as needed when the program is running, so that the program running error caused by class loading will not be exposed immediately, thus forming a potential risk in the running of the program
[0010] It can be seen that the existing JavaEE application class loading mechanism has a potential class loading conflict risk, and it is not easy to locate potential conflicting classes, especially when a JavaEE application contains a large number of jar files. Conflict classes will be more difficult

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Java EE application class loading conflict analyzing method and device
  • Java EE application class loading conflict analyzing method and device
  • Java EE application class loading conflict analyzing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0026] like figure 1 As shown, the embodiment of the present invention provides a JavaEE application class loading conflict analysis method, the method comprising:

[0027] S11. Obtain a class loader chain corresponding to the application to be analyzed.

[0028] S12. Based on the class loader chain, perform conflict analysis on all non-duplicate class files of the application to be analyzed, so as to determine potential conflict classes.

[0029] The JavaEE...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a Java EE application class loading conflict analyzing method and device, relates to the technical field of computer application, and aims at overcoming the defects that an existing Java EE application class loading mechanism has potential class loading conflict risks and potential conflict classes are difficult to position. The Java EE application class loading conflict analyzing method comprises the following steps: obtaining a class loading device chain corresponding to application to be analyzed; and carrying out conflict analysis on all non-repeated class files of the application to be analyzed to determine the potential conflict classes.

Description

technical field [0001] The invention relates to the technical field of computer applications, in particular to a JavaEE application class loading conflict analysis method and device. Background technique [0002] The execution of Java applications usually depends on multiple jar files and Java Virtual Machine (Java Virtual Machine, JVM for short), where the jar files include class files (files with the suffix .class), and the class files need to be loaded into the JVM to run. [0003] The component responsible for loading class files in the JVM is called a class loader. The JVM itself contains a class loader called a bootstrap class loader. The bootstrap class loader is implemented in native code and is responsible for loading the core classes of Java. For example, for classes in Java_home / jre / rt.jar (Java_home is the JDK installation directory), in addition to the bootstrap class loader, the JVM also provides two class loaders, namely the extended class loader and the syst...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/00G06F9/445
Inventor 王鹏亮
Owner BEIJING TONGTECH CO LTD