I am writing a Java project, which is an API provided to the customer to call, but my API requires about 10. Jar files,
In the past, I used the export JAR file function of eclipse to export jar files. Such jar files can be used, but the package customers who depend on my APIs still need to import them, in this way, we need to import a total of 11 packages, which is too troublesome. Now we want to include the API and the dependent jar into a jar, which is much more convenient,
Now, the jar exported using the Export runnable JAR file function of eclipse3.4 contains the dependent jar. You can import this jar as follows,
1. First find the class that provides interfaces in your project (including the main method ),
2. Right-click the class and choose run
3. Select Run configurations
4. In the main window, select main class as the class.
5. Click Run.
6. Right-click your project and choose Export
7. In the pop-up window, select runnable JAR File
8. Select the class you Just configured in the first launch configuration in the pop-up runnable JAR File Export window,
In the second window, select the path you want to export
9. Then select next.