Netbeans没有在dist文件夹中构建lib文件夹 [英] Netbeans not building the lib folder in the dist folder

查看:237
本文介绍了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:

2条警告编译:创建的目录:C:\ Documents和 设置\我\桌面\ ProjectX \ ProjectX \ dist C:\ Documents和 Settings \ me \ Desktop \ ProjectX \ ProjectX \ dist \ ProjectX.jar是一个目录 或无法读取.不复制库.不复制 库.建筑罐子:C:\ Documents和 设置\我\桌面\ ProjectX \ ProjectX \ dist \ ProjectX.jar要运行此文件 命令行中不使用Ant的应用程序,请尝试:java -jar "C:\ Documents and Settings \ me \ Desktop \ ProjectX \ ProjectX \ dist \ ProjectX.jar"jar:BUILD 成功(总时间:3秒)

2 warnings compile: Created dir: C:\Documents and Settings\me\Desktop\ProjectX\ProjectX\dist C:\Documents and Settings\me\Desktop\ProjectX\ProjectX\dist\ProjectX.jar is a directory or can't be read. Not copying the libraries. Not copying the libraries. Building jar: C:\Documents and Settings\me\Desktop\ProjectX\ProjectX\dist\ProjectX.jar To run this application from the command line without Ant, try: java -jar "C:\Documents and Settings\me\Desktop\ProjectX\ProjectX\dist\ProjectX.jar" jar: BUILD SUCCESSFUL (total time: 3 seconds)

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

Why is it not copying the libraries during the build?

推荐答案

根据

According to this forum.netbeans.org (cached copy as forums.netbeans.org is not accessible atm) article this could be caused by ProjectX.jar being added to the required JARs for some mysterious reason... Could be worth checking

缓存的副本似乎已经消失,可以在 此处找到原始线程. a> .

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

再次由于原始副本和缓存副本均已消失,请转到

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文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆