两个月前,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)
望大神指导,谢谢 展开
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)
望大神指导,谢谢 展开
1个回答
展开全部
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).
这个错误显示的应该是你没有将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).
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询