Error during package: Matlab Compiler Java Package

1 visualización (últimos 30 días)
Fredrik
Fredrik el 8 de Mayo de 2015
Respondida: Fredrik el 9 de Mayo de 2015
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?

Respuesta aceptada

Fredrik
Fredrik el 9 de Mayo de 2015
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.

Más respuestas (0)

Categorías

Más información sobre External Language Interfaces en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by