Preface:
During Android development, public functions are encapsulated into components for subsequent application development. The following describes how to package components in Eclipse and use them in other applications.
(If you are engaged in java development, it will float. If you were using dot net development before
Let's stay for a while.
)
Java
Summary of encapsulated components:
Before you describe the java encapsulated components, first describe the dot net
How to encapsulate components. Before encapsulating a public component, create a project and compile and generate a dll file for the project. Other applications are in the project creation process, add other components to load public components.
In Java, every class will generate a class file after compilation. We need to reuse a group of class files. How can we package these files together? This is a jar file, jar files are a collection of class files.
After the jar file is generated, third-party applications can reference third-party components.
JavaEncapsulate Components
Step one: select the project to be encapsulated, right-click the project, and select the Export item.
Step Two click the Export entry to bring up the Export page.
Step Three: Create component information (including selection class and generation position)
Java application encapsulated Components
Step One select the project root directory,Right-click the menu item and select the attribute item at the bottom.
Step Two select java Build path ---> libraries ---> Add External JARS to Add third-party components on the property configuration page.