Java – NetBeans and external configuration files

I am developing a java desktop application and want to have an external configuration file

Solution

You can add it to your build In XML:

<target name="-post-jar">
   <copy todir="${dist.jar.dir}">
       <fileset dir="resources" includes="**"/>
   </copy>        
</target>

You can now add your configuration The XML file is placed in the folder of "resources" (you need to create) in the project, and all the files in it are copied to the dist folder during the construction 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
分享
二维码
< <上一篇
下一篇>>