在 netbeans 中为 .dll/.so 文件提供“java.library.path" [英] giving 'java.library.path' in netbeans for .dll/.so files

查看:31
本文介绍了在 netbeans 中为 .dll/.so 文件提供“java.library.path"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何为 netbeans 中的 .dll.so 文件提供路径以使用

加载库

System.loadLibrary("Foo")

我读了 .

但是他们都给了我不满意的链接错误异常.我如何在 netbeans 中设置 java.library.path 以便我可以直接从 netbeans 测试应用程序,无需在终端上写字?

解决方案

现在可以使用了.您必须对 Netbean IDE 进行一些设置.仅适用于 Netbean IDE.

按照步骤操作:-

==>右键单击项目==>属性==>点击运行==>VM 选项:-Djava.library.path="C:Your Directory where Dll is present"==>好的

它的工作 100%.我已经在我自己的项目中做到了这一点.

How do i give the path for the .dll or .so file in netbeans to load the library using

System.loadLibrary("Foo")

I read this on netbeans page but couldn't help me. as it gives the unsatisfied link error.

These are the two things i tried :

In the following snapshot i created a lib folder inside the netbeans project and placed the dll files inside it.

In the second snapshot i created a lib folder inside the modules folder and placed all the dll files inside lib folder as stated in the link.

But both of them give me unsatisfied link error exception. How do i set java.library.path in netbeans so that i can directly test the application from netbeans, without having to go and write on the terminal ?

解决方案

Its working now. Some little bit setting you have to do with your Netbean IDE.Only of Netbean IDE.

Follow the Steps :-

==>Right click on the Project
==>Properties
==>Click on RUN
==>VM Options : -Djava.library.path="C:Your Directory where Dll is present"
==>Ok

Its working 100%. I have done this in my own project.

这篇关于在 netbeans 中为 .dll/.so 文件提供“java.library.path"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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