为什么Netbeans看不到明确定义并存在的库?

huangapple go评论74阅读模式
英文:

Why can Netbeans not see a library that is clearly defined and present?

问题

我正在使用一个具有多个包的NetBeans项目。我将它们称为package_cam、package_demo和package_drive。在package_drive中,我有一个需要人脸识别SDK的类,它是一个JAR文件,并且在我的库中明确加载。然而,当我运行这个文件时,我收到一个未满足的链接错误,指示找不到sdk jar。如前所述,它在我的库中列出,并且存在于项目文件夹的lib文件夹中。我在Netbeans中四处搜寻,试图找到必须指定该库的位置,但没有成功。有人以前遇到过这种情况吗?某个特定的包无法看到或使用该库是否有原因?我在文件开头导入了SDK,如下所示:

import Luxand.*;
import Luxand.FSDK.*;
import Luxand.FSDKCam.*;

对此的任何帮助将不胜感激!

英文:

I am working with a NetBeans project that has multiple packages. I will call them package_cam, package_demo, and package_drive. Inside of package_drive I have a class that requires a face recognition SDK that is a JAR and is clearly loaded in my libraries. However, when I run this file, I receive an unsatisfied link error stating that the sdk jar cannot be found. As I stated before, it is listed in my libraries and exists in my lib folder in the project folders. I have searched high and low in Netbeans trying to find a location where that lib must be specified but have come up short. Has anyone ever run into this before? Is there a reason that a certain package would not be able to see or use the library? I am importing the sdk at the head of the file with this

import Luxand.*;
import Luxand.FSDK.*;
import Luxand.FSDKCam.*;

Any help with this would be greatly appreciated!

答案1

得分: 1

(假设您使用的是标签为Netbeans 8的问题,并且您的项目是基于Ant的)

一般而言,推荐的方法是使用库包装器模块。有一个向导,因此非常简单,菜单 文件 > 新建项目 > NetBeans模块 > 库包装器模块。更多详细信息请参阅这些Netbeans常见问题解答条目:http://wiki.netbeans.org/DevFaqWhenUseWrapperModule 和 http://wiki.netbeans.org/DevFaqWrapperModules

如果您不使用包装器模块,您应该更新 project.xml 以将库添加到类路径中,例如:

<class-path-extension>
    <runtime-relative-path>ext/hexedit.jar</runtime-relative-path>
    <binary-origin>release/modules/ext/hexedit.jar</binary-origin>
</class-path-extension>

请参阅另一个常见问题解答条目:http://wiki.netbeans.org/DevFaqHowPackageLibraries

英文:

(I assume you use Netbeans 8 from the question tag, and your project is Ant-based)

In general the recommended way is to use a library wrapper module. There is a wizard so it's very easy, menu File > New Project > NetBeans Modules > Library Wrapper Module. More details in these Netbeans FAQ entries: http://wiki.netbeans.org/DevFaqWhenUseWrapperModule and http://wiki.netbeans.org/DevFaqWrapperModules

If you don't use a wrapper module, you should update project.xml to add the library to the class path, for example:

&lt;class-path-extension&gt;
    &lt;runtime-relative-path&gt;ext/hexedit.jar&lt;/runtime-relative-path&gt;          
    &lt;binary-origin&gt;release/modules/ext/hexedit.jar&lt;/binary-origin&gt;
&lt;/class-path-extension&gt;

See this other FAQ entry: http://wiki.netbeans.org/DevFaqHowPackageLibraries

huangapple
  • 本文由 发表于 2020年9月24日 08:52:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/64038104.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定