访问java中的dll文件 [英] access dll files in java

查看:76
本文介绍了访问java中的dll文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个dll文件,在matlab中用于svm训练和分类。我想在Java中使用。当我尝试导入它们时,我得到的错误是所选文件不是有效的库。我已经尝试过这个链接以及tarted.md> https://github.com/twall/jna/blob/master/www/GettingStarted.md [ ^ ]

访问该功能。但是,我不知道是什么函数/代码在dll文件中。有没有办法可以将参数传递给dll文件(就像在matlab中完成的那样)?



谢谢!

I have two dll files which are used in matlab for svm training and classification. I want to use in Java. When I try to import them I get error that the selected files are not valid library. I have tried this link as well tarted.md">https://github.com/twall/jna/blob/master/www/GettingStarted.md[^]
to access the function. However, I do not know what functions/code is there in the dll files. Is there any way I can pass the arguments to the dll files (like it is done in matlab)?

Thanks!

推荐答案

尝试以这种盲目折叠的方式使用DLL并不是真的有用。相反,使用Matlab库和文档来实现Matlab和Java之间的互操作性。请参阅:

http://www.mathworks.com/help/matlab /matlab_external/product-overview.html [ ^ ],

http://www.mathworks.com/discovery/java-math.html [ ^ ],

http://www.mathworks.com/products/javabuilder/ [ ^ ]。



-SA
It's not really useful to try to use DLLs in such a blind-folded way. Instead, use Matlab libraries and documentation for interoperability between Matlab and Java. Please see:
http://www.mathworks.com/help/matlab/matlab_external/product-overview.html[^],
http://www.mathworks.com/discovery/java-math.html[^],
http://www.mathworks.com/products/javabuilder/[^].

—SA


您是否检查过DLL文件的文档?没有它,就很难使用它们。但是,如果您有文档,那么您需要学习 Java Native Interface [ ^ ],看看如何使用Java中的DLL。
Have you checked the documentation for the DLL files? Without that it is going to be difficult to use them. However, if you do have the documentation then you need to study the Java Native Interface[^], to see how to use DLLs from Java.


这篇关于访问java中的dll文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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