10升级后调用本机DLL时

10升级后调用本机DLL时

本文介绍了Windows 10升级后调用本机DLL时,Netbeans中出现UnsatisfiedLinkError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Windows 7升级到Windows 10后,我的Netbeans项目在调用本机DLL时抛出UnsatisfiedLinkErrors:

After upgrading from Windows 7 to Windows 10, my Netbeans Project throws UnsatisfiedLinkErrors when calling native DLL's:

Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\SVN\SoftwareProjectsV2\Modules\PTS\trunk\SimController_JNIWrapper.dll: Can't find dependent libraries

在Netbeans外部运行我的Java程序工作正常,只有Netbeans似乎在查找DLL时有问题.

Running my Java-Program outside of Netbeans works just fine, only Netbeans seems to have a problem finding the DLL's.

我已经将-Djava.library.path =添加到了VM Options中,而没有进行改进.

I already added -Djava.library.path= to the VM Options without improvement.

有人经历过类似的事情并且可以给我提示吗?

Has somebody experienced something similar and could give me a hint?

推荐答案

在重新干净安装Windows 10,Java,MSVC库,Netbeans并从源文件和DLL创建新项目后,我仍然无法运行来自NetBeans的项目.

After a clean reinstall of Windows 10, Java, MSVC libs, Netbeans and creating a new project from my source files and DLL's, I still can't run my project from NetBeans.

使用Eclipse测试了我的项目,它可以正常工作,因此我将所有项目都切换到Eclipse.

Tested my project with Eclipse and it works, so I'm switching to Eclipse with all my projects.

不是我想到的解决方案,但至少我可以再次工作.

Not the solution I had in mind, but at least I can work again.

将包含dll的项目根文件夹添加到PATH环境变量后,我可以再次使用NetBeans.但这也不是理想的解决方案,因为我有不同的项目,并且使用相同版本的dll.

After adding my projects rootfolder, which contains my dll's, to the PATH environment variable, I can use NetBeans again. But this is also not the ideal solution, since I have different projects, using different versions of the same dll.

这篇关于Windows 10升级后调用本机DLL时,Netbeans中出现UnsatisfiedLinkError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 07:17