Copy data files when building in Java / eclipse

With my java source code, I have some data files that I want to copy to the build directory when the source code is built At present, I don't use any build tools (such as Maven or ant), but only develop and run unit tests in eclipse

Solution

First create a new source folder and call it like res. you can use this folder to store your data files Next, open the Java build path section of the project properties (from the project context menu) Select the source tab In this tab, you can control the output folder of each source folder By default, eclipse copies all non java files in the source folder to the output directory during the build process

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>