我用 Java
创建了一个小程序。它使用 Java 类、一些图像并生成一些其他资源(.php
文件、图像、样式表等)。
我正在将源代码编译为 .jar
并创建一个 .exe
程序,该程序应该使用我的 .jar
和其他资源。
组织 Java 程序的所有源代码的最佳做法是什么?
最佳答案
我会推荐下面的 maven 结构作为 standard convention即使你没有使用 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 - 如何组织Java程序的源文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11926334/