Apart from the core class, eclipse functions are provided by plug-ins. Plug-ins often expand to each other, and these plug-ins will inevitably use each other's classes. Eclipse assigns a classloader to each plug-in to load the class. By default, classes in different plug-ins of eclipse are invisible to each other.
In either case, the Eclipse plug-in may use classes of other plug-ins. First, add the plug-in dependence directly, and thenProgram. Then, use the value of extension point elemen T as the class name to load a class. Both find the classloader of the plugin where the class is located at runtime, load the class, and return.
Problems:
Class version conflict. In a plug-in, classes with the same name are loaded in different ways, and errors will occur when obfuscation is used. It is best to use an interface, and this interface class must come from the same place.
Class export. A plug-in can be used to configure the classes that require export at runtime. If these classes are not configured, the compilation may fail. Some classes may fail to be loaded, or some classes may be loaded from an unwanted plug-in.