Can't resolve dependencies for Java library.

6 次查看(过去 30 天)
I'm trying to build a *.jar File from some Matlab code. This code has dependencies that i added at "Files required for your library to run". But if i run the jar i get: "Can't find "MyCode.p"", but the file was added like other Libs that are working. What did i miss?
By the way: There are some yellow triangles at "Files required for your library to run", i couldn't find a meaning for it.

回答(1 个)

Rohit Kudva
Rohit Kudva 2015-10-21
编辑:Rohit Kudva 2015-10-21
Hi Claas,
I understand that you have compiled your MATLAB function to a JAR file which you using in a Java driver application. But the dependency p-code file that you added during compilation in not being detected by your driver application
One way to check if the p-code file was successfully extracted is to check the MCR cache directory. For Windows OS, by default this directory will be [C:\Users\{username}\AppData\Local\Temp\{username}\mcrCache{mcrversion}]. If you have set the MCR_CACHE_ROOT environment variable, then the files would have been extracted in the directory pointed by that environment variable.
One possible reason for this issue is that starting MATLAB R2014a, you can't compile pure p-code file. If you compile p-code file, you also need to have the corresponding .m file in the same folder.
Regards,
Rohit

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by