我创建了一个应用程序。在这个应用程序中,我怀疑在获取输出时我需要包含lib
(包含所有支持jar文件的库文件夹)但我需要在一个jar文件中必须包含所有支持jar。可能吗?我正在使用Netbeans。
答案 0 :(得分:0)
您没有告诉我们您使用什么来构建代码。我要猜maven(因为我知道答案是在Maven!)。你需要的是:
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Add your other plug-ins here -->
</plugins>
</build>