我用java调用matlab m文件报这个错误,求助

16:14 提问
matlab m文件构建成Java 报错不知道是什么错误
m文件内容是:
function [sum] = oper(a,b);
出错的错误是:
正在构造 Javadoc 信息...
标准 Doclet 版本 1.8.0_40
正在构建所有程序包和类的树...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\oper\Class1.html...
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1.java:110: 警告: args没有 @param
public static void main (String[] args)
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1.java:60: 警告: com.mathworks.toolbox.javabuilder.MWException没有 @throws
public Class1() throws MWException
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1.java:89: 警告: com.mathworks.toolbox.javabuilder.MWException没有 @throws
public Class1(MWComponentOptions componentOptions) throws MWException
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1.java:78: 警告: com.mathworks.toolbox.javabuilder.MWException没有 @throws
public Class1(String pathToComponent) throws MWException
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\oper\Class1Remote.html...
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1Remote.java:59: 错误: 找不到引用
* @throws java.jmi.RemoteException An error has occurred during the function call or
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1Remote.java:62: 警告: java.rmi.RemoteException没有 @throws
public Object[] oper(int nargout, Object... rhs) throws RemoteE
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\Class1Remote.java:65: 警告: java.rmi.RemoteException没有 @throws
void dispose() throws RemoteE
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\oper\OperMCRFactory.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\oper\package-frame.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\oper\package-summary.html...
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\package-info.java:8: 警告:
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\package-info.java:15: 错误: 意外的结束标记:
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\package-info.java:21: 警告:
C:\Users\Administrator\Documents\MATLAB\oper\for_testing\oper\package-info.java:27: 错误: 意外的结束标记:
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\oper\package-tree.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\constant-values.html...
正在构建所有程序包和类的索引...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\overview-tree.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\index-all.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\deprecated-list.html...
正在构建所有类的索引...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\allclasses-frame.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\allclasses-noframe.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\index.html...
正在生成C:\Users\Administrator\Documents\MATLAB\oper\for_testing\doc\html\help-doc.html...
Error: An error occurred while shelling out to javadoc (error code = 1).
Unable to build executable.
按赞数排序
我也遇到了相同的问题,据说是JDK版本太高了,换成1.7或者1.6,还没有进行实验验证。
亲测,matlab 2014a 用jdk1.7
matlab 2013a 用jdk1.6
521关注|331收录
534关注|1135收录
1660关注|784收录Exception&in&thread&&main&&java.lang.UnsatisfiedLinkError:&Failed&to&find&the&library&mclmcrrt7_14.dll,&required&by&MATLAB&Builder&JA,&on&java.library.path.
&This&library&is&typically&installed&along&with&MATLAB&or&the&MCR,&its&absence&may&indicate&an&issue&with&that&installation&or&the&current&path&configuration.
The&MCR&version&that&this&component&is&trying&to&use&is:&7.14.
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ProxyLibraryDir.get(MCRConfiguration.java:167)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ProxyLibraryDir.&clinit&(MCRConfiguration.java:173)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getProxyLibraryDir(MCRConfiguration.java:178)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.get(MCRConfiguration.java:77)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$MCRRoot.&clinit&(MCRConfiguration.java:87)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getMCRRoot(MCRConfiguration.java:92)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration$ModuleDir.&clinit&(MCRConfiguration.java:66)
at&com.mathworks.toolbox.javabuilder.internal.MCRConfiguration.getModuleDir(MCRConfiguration.java:71)
at&com.mathworks.toolbox.javabuilder.internal.MWMCR.&clinit&(MWMCR.java:1549)
at&kevinjava.KevinjavaMCRFactory.newInstance(KevinjavaMCRFactory.java:50)
at&kevinjava.KevinjavaMCRFactory.newInstance(KevinjavaMCRFactory.java:61)
at&kevinjava.Class1.&init&(Class1.java:84)
at&rmHandle.main(rmHandle.java:11)
有哪位遇到同样的问题,最后解决了的吗?求解啊,弄了一下午没搞定
回复讨论(解决方案)
你电脑上有装matlab吗?
简单的办法是找同学copy个mclmcrrt7_14.dll过来放到c:/windows/system32下面
谢谢,已经解决了,就是这个方法
你好,我也遇到这个问题了,但是我身边的同学电脑里都没有这个文件,能给我发一份吗?谢谢,
你好,我也遇到这个问题了,但是我装了Matlab2010b了。我在我Matlab安装文件中找到这个mclmcrrt7_14.dll文件了,但是放到C盘里还是报错,怎么解决啊。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&Java中调用matlab遇到的问题
1.调用过程忘记了,重新google。
2.java中的函数参数问题,参数第一个值为输出的个数,后面的参数为matlab
m文件的函数参数。当第一个值大于输出数个数时,系统会报output too many。
3.java中times相乘double和int类型不兼容问题,这个在matlab里是可以运行的,但是java会报错,
“Error using ==& times Integers can only be combined
with integers of the same class, or scalar
doubles.”,开始把整数前面加上double,后来玩了一会儿,回头想,输入参数5直接变为5.0就可以了。
4.matlab返回的特征不一致,最后一比较,发现颜色直方图那里的function多了一个end,把end去掉并把返回的特征变为一列,特征就可以一个一个值的取了,否则会有matlab的标志的column
1 from && 之类的。不明白为什么。
今天发现,我很罗嗦。包括写文章的时候,废话一堆。
我有点拖拉,平时不努力,要交了要熬夜。
我还很健忘~~
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

 

随机推荐