两个月前,Java调用Matlab生成的jar文件可以使用,可现在不知怎么出错了,之前的正确代码也不能运行了

显示错误:java.lang.Exception:Failedtofindtheruntimelibraries,requiredbyMATLABBuilderJA,on... 显示错误:
java.lang.Exception: Failed to find the runtime libraries, required by MATLAB Builder JA, on system path
at com.mathworks.toolbox.javabuilder.internal.MWMCR.getMLorMCRRuntimeLibDir(MWMCR.java:1564)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1461)
望大神指导,谢谢
展开
 我来答
759317909
2013-08-19 · 超过21用户采纳过TA的回答
知道答主
回答量:99
采纳率:0%
帮助的人:62.9万
展开全部
java.lang.Exception: Failed to find the runtime libraries, required by MATLAB Builder JA, on system path

这个错误显示的应该是你没有将Builder JA的路径包含在你的Java lib路径中,添加进去就行;

Java Builder的位置:..\MATLAB\R2012a\toolbox\javabuilder\jar\javabuilder.jar
还有一点:
把你的matlab的bin的路径添加到系统的path路径中,也可以把你的mcr的bin路径添加到path中,你可以采用命令行的形式:
set Path=%Path%;<matlabroot>\bin\win32
或者
set Path=%Path%;<mcr_root>\<version>\runtime\win32,
参考网址:
http://www.mathworks.cn/support/solutions/en/data/1-78FIKN/index.html?product=MJ&solution=1-78FIKN
http://www.mathworks.cn/matlabcentral/newsreader/view_thread/296636
原文是:
You are receiving this error because the required "bin" directories of either the MATLAB or MATLAB Compiler Runtime (MCR) installations have not been set up correctly on your Windows machine's PATH environment variable. You can make the necessary runtime libraries visible to MATLAB-compiled components by adding either:
<matlabroot>\bin\win32 or <mcr_root>\<version>\runtime\win32
to your system PATH, depending on whether you are developing against a local MATLAB installation, or the MCR. Either replace <matlabroot> with the MATLAB installation directory on your machine (e.g., C:\Program Files\MATLAB\R2008a), or <mcr_root> with the MCR installation directory (e.g., C:\Program Files\MATLAB\MATLAB Compiler Runtime) and <version> with the version of the installed MCR (e.g., v78).
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式