Home >Java >javaTutorial >How to Include Additional Resources When Exporting a Java Program as a JAR File in Eclipse?
How to Export a Java Program as a JAR File in Eclipse
This article addresses the challenge of exporting a Java program into a JAR file in Eclipse. The user encounters an issue where only the main class is exported, along with the desire to include additional resources such as images and PDFs in the JAR file.
To solve this issue, Eclipse provides a straightforward solution:
When exporting the program as a JAR file, ensure that all necessary resources are included in the export. By default, Eclipse allows for the inclusion of various resource types, including images, configuration files, and others. In the Export dialog, make sure to select all the required resources. By default, exporting other resource files (images, configuration files, etc.) is also fine. See screenshot below.
[JAR Export Dialog]The above is the detailed content of How to Include Additional Resources When Exporting a Java Program as a JAR File in Eclipse?. For more information, please follow other related articles on the PHP Chinese website!