[英]How to add a .jar file in a Netbeans project specifying a relative path
I'm trying to add ojdbc
and another .jar
file into my project specifying the relative path such that, if I gave the project to a friend of mine, he would be able to import that project with all necessary .jar
files already included (and so he doesn't have to pick these files, but the project .zip
file is "ready-to-use"). 我正在尝试将
ojdbc
和另一个.jar
文件添加到我的项目中,并指定相对路径,这样,如果我将该项目交给我的一个朋友,他将能够使用已经包含所有必需的.jar
文件导入该项目(因此他不必选择这些文件,但项目.zip
文件是“随时可以使用的”)。
Now, as the following image shows: 现在,如下图所示:
I right click on my project's Libraries
entry and choose the necessary .jar
file. 我右键单击项目的
Libraries
条目,然后选择必要的.jar
文件。 But when I try to specify a relative path, Netbeans deny it and so I could not be able to give this project (exported as a .zip
file using Netbeans' export "function"), as the following image shows: 但是,当我尝试指定相对路径时,Netbeans拒绝了它,因此我无法给出这个项目(使用Netbeans的导出“函数”导出为
.zip
文件),如下图所示:
.jar
files to the project and then export it and give it to a friend of mine? .jar
文件“包含”到项目中,然后将其导出并提供给我的朋友的正确方法吗? Note that my .zip
project which I import with Netbeans and my .jar
file are in the same directory (Desktop): 请注意,我使用Netbeans导入的
.zip
项目和.jar
文件位于同一目录(桌面)中:
Solved : 解决 :
.jar
files as shown in the 1st and 2nd images; .jar
文件; .jar
file you added; .jar
文件;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.