• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

java matlab 混合编程 Failed to find the required library mclmcrrt9_2.dll on java ...

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

问题描述:

  

Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the required library mclmcrrt9_2.dll on java.library.path.
This library is typically installed along with MATLAB or the MATLAB Runtime. Its absence may indicate an issue with that installation or 
the current path configuration, or a mismatch with the architecture of the Java interpreter on the path.
MATLAB Runtime version this component is attempting to use: 9.2.
Java interpreter architecture: win64.
at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ProxyLibraryDir.get(MCRConfiguration.java:
324) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ProxyLibraryDir.<clinit>(MCRConfiguration.java:334) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getProxyLibraryDir(MCRConfiguration.java:339) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.get(MCRConfiguration.java:64) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.<clinit>(MCRConfiguration.java:76) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getMCRRoot(MCRConfiguration.java:81) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ModuleDir.<clinit>(MCRConfiguration.java:53) at com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getModuleDir(MCRConfiguration.java:58) at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1699) at nsgaii.NsgaiiMCRFactory.newInstance(NsgaiiMCRFactory.java:55) at nsgaii.NsgaiiMCRFactory.newInstance(NsgaiiMCRFactory.java:66) at nsgaii.NsgaiiOperator.<init>(NsgaiiOperator.java:167) at optimization.algorithm.nsgaii.NSGAII.main(NSGAII.java:33)

问题分析:

  未安装matlab runtime运行环境,或运行环境版本不匹配

问题解决:

  1. 安装MCR环境(E:\MATLAB\R2017a\toolbox\compiler\deploy\win64\MCRInstaller.exe)

   配置  path

       C:\Program Files\MATLAB\MATLAB Runtime\v92\runtime\win64

   配置

     MATLAB_JAVA

     D:\install\java\jdk1.8.0_181\jre

      

  2. 配置java环境

    JAVA_HOME

    D:\install\java\jdk1.8.0_181

    

       CLASSPATH

    %JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

    

     PATH

    ;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin

  

参考链接:

  1.Matlab Compiler SDK 使用步骤及常见问题总结(全)

  2.MATLAB MCR安装以解决GUI编程软件移植运行问题


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap