简体   繁体   English

如何克服这个例外

[英]how to overcome this exception

i am using a third part SDK with my java application.The providers of sdk provided me exe file that i installed and one java project.I installed the exefile. 我在Java应用程序中使用了第三方SDK.sdk的提供者向我提供了我安装的exe文件和一个Java项目。我安装了exefile。 Now when i run the code i get a dialog box showing error 现在,当我运行代码时,我得到一个显示错误的对话框

Excepting a absulut path for library AKSSDK.dll
No AKSSDK in java.library.path
could not load load library AKSSDK

how do i resolve it? 我该如何解决?

You need to run java with the following configuration: 您需要使用以下配置运行java

java -Djava.library.path={where your library is}

Note the above is the directory where your library is, not the full path name of the library! 请注意,以上是您的库所在的目录 ,而不是库的完整路径名!

You have to add AKSSDK.dll to your PATH environment variable. 您必须将AKSSDK.dll添加到PATH环境变量中。

It would look like this: 它看起来像这样:

echo %PATH%
C:\xyz\;C:\other\etc\etc;C:\Your\Path\To\AKSSDK.dll

EDIT 编辑

To modify your environment variable you have to go to: 要修改环境变量,您必须转到:

MyComputer/RightClick/Properties/Advanced/EnvironmentVariables MyComputer / RightClick / Properties / Advanced / EnvironmentVariables

替代文字
(source: vlaurie.com ) (来源: vlaurie.com

And modify the existing Path under System variables 并在系统变量下修改现有Path

See this tutorial for more details: http://vlaurie.com/computers2/Articles/environment.htm 有关更多详细信息,请参见本教程: http : //vlaurie.com/computers2/Articles/environment.htm

I have had problems with the white space of ( Program files ) in the past. 过去我对(程序文件)的空白有疑问。 If possible install your SDK on something like C:\\SondaSDK or C:\\You\\SondaSDK 如果可能的话,将SDK安装在C:\\SondaSDKC:\\You\\SondaSDK

That way you shouldn't have problems. 这样,您就不会有问题。

You can manually set the path to this value by starting with 您可以通过以下方式手动将路径设置为此值:

java -Djava.library.path=PATH_TO_LIBRARY java -Djava.library.path = PATH_TO_LIBRARY

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

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