简体   繁体   English

在Netbeans 7中更改JAR文件的目标文件夹

[英]Change destination folder of JAR files in Netbeans 7

I'm working on a multiproject solution for a client and we're trying to have all our builds automatically go into a predetermined BIN folder. 我正在为客户端开发一个多项目解决方案,我们正在尝试让所有构建自动进入预定的BIN文件夹。 All the C++ projects were easily enough moved over but the Java side has proven not so easily configured. 所有的C ++项目都很容易被移除,但Java方面已证明不那么容易配置。 When I go to the project's properties and go to Build->Packaging the "JAR File:" text box shows a read-only text-box pointing to "dist/App.jar" (which I would like to change to "../../../bin/App.jar". Any thoughts on how to do this? 当我转到项目的属性并转到Build-> Packaging时,“JAR文件:”文本框显示一个指向“dist / App.jar”的只读文本框(我想将其更改为“.. /../../bin/App.jar“。有关如何做到这一点的任何想法?

You can change the dist-folder by editing the dist.dir key in the project.properties file which is located in the nbproject directory from 您可以通过编辑位于nbproject目录中的project.properties文件中的dist.dir键来更改dist-folder。

dist.dir=dist

to

dist.dir=../../../bin

In my case the key is in line 24. The name of the jar-file itself is determined by the dist.jar key, if you would need to rename the file aswell. 在我的情况下,键位于第24行。如果您需要重命名文件,jar文件本身的名称由dist.jar键确定。

Did you check under the menu 你在菜单下查了一下吗?

[Run] --> [Set project configuration] --> [Customize] [运行] - > [设置项目配置] - > [自定义]
You have plenty of options to change there, it is easy than that. 你有很多选择可以改变它,这很容易。

Good luck 祝好运

add into build.xml 添加到build.xml中

<target name="-post-jar">
    <copy file="${dist.jar}" todir="drive\path\"/>
</target>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM