如何组织Java程序的源文件? [英] How to organize source files of Java program?
本文介绍了如何组织Java程序的源文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Java
中创建了小程序。它使用Java类,一些图像并生成一些其他资源( .php
文件,图像,样式表等)。
I've created small program in Java
. It uses Java classes, some images and generates some other resources (.php
files, images, stylesheets etc).
我正在将源代码编译为 .jar
并创建一个 .exe
程序,该程序应该使用我的 .jar
和其他资源。
I'm compiling sources as .jar
and creating an .exe
program, which should use my .jar
and other resources.
组织我的Java程序的所有来源的最佳做法是什么?
What is the best practice to organize all sources of my Java program?
推荐答案
我将推荐以下maven结构作为标准约定。
I will recommend the below maven structure as the standard convention even if you are not using maven.
src/main/java Application/Library sources
src/main/resources Application/Library resources
src/main/filters Resource filter files
src/main/assembly Assembly descriptors
src/main/config Configuration files
src/main/scripts Application/Library scripts
src/main/webapp Web application sources
src/test/java Test sources
src/test/resources Test resources
src/test/filters Test resource filter files
src/site Site
LICENSE.txt Project's license
NOTICE.txt Notices and attributions required by libraries that the project depends on
README.txt Project's readme
这篇关于如何组织Java程序的源文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文