Matlab 引擎:许可证检出失败

问题描述

我想弄清楚为什么我在从 Java 运行 Matlab 引擎时会收到 License Checkout Failed我有这个非常简单的 Matlab 脚本:

function [] = test()
x = [1 2 3 4 5];
y = [ 4 6 8 5 3];
 mdl = fitlm(x,y);
 mdl
end

fitlm 需要 Statistics_ToolBox。我可以在 Matlab(2019b 版)桌面应用程序中运行上述脚本而不会出现问题。但是当我通过 Matlab 引擎运行相同的脚本时,我得到

Exception in thread "main" com.mathworks.engine.MatlabExecutionException: test()
    at com.mathworks.engine.FutureResult.get(FutureResult.java:64)
    at com.mathworks.engine.MatlabEngine.eval(MatlabEngine.java:349)
    at xxxxxxx.main(Test.kt:11)
Caused by: com.mathworks.mvm.exec.MvmruntimeException: License checkout Failed.
License Manager Error 0

Troubleshoot this issue by visiting: 
https://www.mathworks.com/support/lme/R2019b/0

Diagnostic information:
Feature: Statistics_ToolBox 
License path: C:\Users\xxxx\AppData\Roaming\MathWorks\MATLAB\R2019b_licenses;C:\Program Files\MATLAB\R2019b\licenses\license.dat;C:\Program Files\MATLAB\R2019b\licenses\network.lic 
Licensing error: 0,0.
    ... 3 more
com.mathworks.mvm.exec.MvmruntimeException: License checkout Failed.
License Manager Error 0

有什么想法会导致桌面应用程序和引擎之间的许可证签出过程有什么不同吗?我唯一的想法可能是我的公司有一个代理服务器,并且想知道桌面应用程序是否知道引擎不知道的代理设置。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)