Click here to Skip to main content
16,013,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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!
Posted

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
 
Share this answer
 
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.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Oct-13 12:21pm    
I don't think this is especially useful in this particular case, as OP does not know what exactly is in those DLLs. The may not be well designed for immediate use of not documented for this purpose. Instead, OP needs to use legitimate Matlab facilities for Java-Matlab interopertability, please see my answer.
—SA
Richard MacCutchan 22-Oct-13 12:30pm    
Assuming you are correct, but what if you are not.
Sergey Alexandrovich Kryukov 22-Oct-13 13:40pm    
Than OP will successfully use both approaches. :-)
Cheers,
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900