Matlab Engine Java Exeption无法启动matlab [英] Matlab Engine Java Exeption Unable to launch matlab
问题描述
我正在尝试使用java引擎使用java中的matlab(使用Ubuntu 16.04和Matlab 2017a的试用。另外,我正在关注Matlab官方页面中发布的代码( https://www.mathworks.com/help/matlab/matlab_external/execute -matlab-functions-from-java.html )以获取某些数字的根为例。我在Java构建路径中添加了外部Jars和本机库位置。完成所有这些后,代码执行了没有出现任何错误。但运行代码,它显示我输入我的Matlab帐户和密码时的下一个异常:
I am trying to use matlab from java using the java engine (Working on Ubuntu 16.04 and the trial of Matlab 2017a. Also, I'm following the code posted in the official page of Matlab ( https://www.mathworks.com/help/matlab/matlab_external/execute-matlab-functions-from-java.html) with the example of obtain the roots of some numbers. I added in the Java build path the external Jars and the native library location. After all of this, the code does not present any error. But running the code, it shows the next exception at the moment i enter my Matlab account and the password:
Exception in thread "main" com.mathworks.engine.EngineException: Unable to launch MATLAB.
at com.mathworks.engine.MatlabEngine.open(MatlabEngine.java:334)
at com.mathworks.engine.MatlabEngine.startMatlab(MatlabEngine.java:143)
at LoadImageFromFile.ReadImage.main(ReadImage.java:26)
我需要做什么?我忘记了什么?
What I need to do? There's something that I am forgetting?
推荐答案
当我从Matlab 2016b升级到2017b时遇到同样的问题,你必须保持从Java
I had the same problem when I upgrated from Matlab 2016b to 2017b , you have to keep matlab closed when calling it from Java
这篇关于Matlab Engine Java Exeption无法启动matlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!