本文介绍了Netbeans没有在dist文件夹中构建lib文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试清洁和构建jar,但是由于某种原因,当我执行Run-> Clean and Build Main Project时,在dist文件夹中没有lib文件夹.当我通过cmd运行jar文件时,这会导致缺少类错误.如何在构建过程中将其配置为在dist文件夹中包含lib文件夹?谢谢.

I am trying to clean and build a jar but for some reason when I do a Run-> Clean and Build Main Project, I don't get a lib folder in the dist folder. This is causing a missing classes error when I run my jar file via cmd. How do I configure it to have the lib folder in my dist folder during my build? Thank you.

另外,当我点击Run-> Clean and Build Main Project时,输出显示以下内容:

Also, when I hit Run->Clean and Build Main Project, the output says the following:

为什么在构建过程中不复制库?

Why is it not copying the libraries during the build?

推荐答案

根据文章可能是由于某些神秘原因将ProjectX.jar添加到所需的JAR中引起的...可能值得检查

According to article this could be caused by ProjectX.jar being added to the required JARs for some mysterious reason... Could be worth checking

缓存的副本似乎已经消失,可以在.

cached copy seems to have disappeared, the original thread can be found .

再次由于原始副本和缓存副本均已消失,请转到回溯机器以阅读本文.话虽这么说,但2018年以后的版本可能应该考虑使用更现代/更广泛的项目格式,例如Maven,它也得到Netbeans的大力支持,并提供了更加灵活的库管理方法.

EDIT again: as both the original and the cached copy have disappeared, head over to the wayback machine to read the article. That being said, anno 2018+ one should probably consider using a more modern / widespread project format like Maven, which is also well supported by Netbeans and offers a much more flexible libraries management approach.

这篇关于Netbeans没有在dist文件夹中构建lib文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-21 19:10