Error during package: Matlab Compiler Java Package

조회 수: 1 (최근 30일)
Fredrik
Fredrik 2015년 5월 8일
답변: Fredrik 2015년 5월 9일
I tried packaging the following simple m-file:
function a = addup(b,c)
a = b+c;
end
using the Compiler GUI. I get the following error log:
_ant:
<ant>
<mkdir dir="C:\Users\Fredrik\Documents\MATLAB\addup\for_redistribution" />
<mkdir dir="C:\Users\Fredrik\Documents\MATLAB\addup\for_testing" />
<mkdir dir="C:\Users\Fredrik\Documents\MATLAB\addup\for_redistribution_files_only" />
</ant>
mcc -W 'java:addup,Class1' -T link:lib -d C:\Users\Fredrik\Documents\MATLAB\addup\for_testing class{Class1:C:\Users\Fredrik\Documents\MATLAB\addup.m}
[Warning: Adding path "C:\Users\Fredrik\Documents\MATLAB" to Compiler path
instance.]
Loading source files for package addup...
Constructing Javadoc information...
Creating destination directory: "C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\"
Standard Doclet version 1.8.0_25
Building tree for all the packages and classes...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\addup\AddupMCRFactory.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\addup\Class1.html...
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1.java:109: warning: no @param for args
public static void main (String[] args)
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1.java:59: warning: no @throws for com.mathworks.toolbox.javabuilder.MWException
public Class1() throws MWException
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1.java:88: warning: no @throws for com.mathworks.toolbox.javabuilder.MWException
public Class1(MWComponentOptions componentOptions) throws MWException
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1.java:77: warning: no @throws for com.mathworks.toolbox.javabuilder.MWException
public Class1(String pathToComponent) throws MWException
^
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\addup\Class1Remote.html...
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1Remote.java:58: error: reference not found
* @throws java.jmi.RemoteException An error has occurred during the function call or
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1Remote.java:61: warning: no @throws for java.rmi.RemoteException
public Object[] addup(int nargout, Object... rhs) throws RemoteException;
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\Class1Remote.java:64: warning: no @throws for java.rmi.RemoteException
void dispose() throws RemoteException;
^
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\addup\package-frame.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\addup\package-summary.html...
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\package-info.java:8: warning: empty <p> tag
* <p>
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\package-info.java:15: error: unexpected end tag: </p>
* </p>
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\package-info.java:21: warning: empty <p> tag
* <p>
^
C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\addup\package-info.java:27: error: unexpected end tag: </p>
* </p>
^
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\addup\package-tree.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\constant-values.html...
Building index for all the packages and classes...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\overview-tree.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\index-all.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\deprecated-list.html...
Building index for all classes...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\allclasses-frame.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\allclasses-noframe.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\index.html...
Generating C:\Users\Fredrik\Documents\MATLAB\addup\for_testing\doc\html\help-doc.html...
3 errors
8 warnings
Error: An error occurred while shelling out to javadoc (error code = 1).
Unable to build executable (specify the -v option for more information)._
What's wrong?

채택된 답변

Fredrik
Fredrik 2015년 5월 9일
I found the solution based on this answer. Download the Java 1.7 JDK version and reset the JAVA_HOME environment variable to the directory of this version.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 External Language Interfaces에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by