Why do I get error: unexpected end tag and Error: An error occurred while shelling out to javadoc while creating JAR from MATLAB Compiler SDK with JDK 1.8?

10 views (last 30 days)
I am creating a Java Application from MATLAB code using MATLAB Compiler SDK.
However, while compiling the sample code, I am getting some errors-
C:\Users\detomal\makesqr\for_testing\makesqr\Class1.java:207: error: unexpected end tag: </p>
* </p>
^
C:\Users\detomal\makesqr\for_testing\makesqr\Class1.java:59: warning: no @throws for com.mathworks.toolbox.javabuilder.MWException
public Class1() throws MWException
^
C:\Users\detomal\makesqr\for_testing\makesqr\Class1.java:88: warning: no @throws for com.mathworks.toolbox.javabuilder.MWException
public Class1(MWComponentOptions componentOptions) throws MWException
Generating C:\Users\detomal\makesqr\for_testing\doc\html\makesqr\Class1Remote.html...
C:\Users\detomal\makesqr\for_testing\makesqr\Class1Remote.java:62: error: reference not found
* @throws java.jmi.RemoteException An error has occurred during the function call or
^
C:\Users\detomal\makesqr\for_testing\makesqr\Class1Remote.java:65: warning: no @throws for java.rmi.RemoteException
public Object[] makesqr(int nargout, Object... rhs) throws RemoteException;
^
C:\Users\detomal\makesqr\for_testing\makesqr\Class1Remote.java:68: warning: no @throws for java.rmi.RemoteException
void dispose() throws RemoteException;
^
Generating C:\Users\detomal\makesqr\for_testing\doc\html\makesqr\MakesqrMCRFactory.html...
Generating C:\Users\detomal\makesqr\for_testing\doc\html\makesqr\package-frame.html...
Generating C:\Users\detomal\makesqr\for_testing\doc\html\makesqr\package-summary.html...
C:\Users\detomal\makesqr\for_testing\makesqr\package-info.java:8: warning: empty <p> tag
* <p>
^
C:\Users\detomal\makesqr\for_testing\makesqr\package-info.java:15: error: unexpected end tag: </p>
* </p>
6 errors
8 warnings
Error: An error occurred while shelling out to javadoc (error code = 1).
Unable to build executable.
Error using mcc
Error executing mcc, return status = 1 (0x1).
How to fix this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Jan 2018
You are using Java 1.8 with MATLAB R2016b.
MATLAB R016b is qualified and tested to work with Java 1.7 only.
Refer the following document for more details-
There are three workarounds that you can use in order to make it work-
1. Update MATLAB to R2017b which supports Java 1.8
2.  Download and install Java 1.7 JDK version and reset the JAVA_HOME environment variable to the directory of this version.
3. Use <https://www.mathworks.com/help/compiler_sdk/ml_code/mcc.html mcc> command with the -K flag. This will allow you to keep the intermediate files without deleting them while you are compiling with JDK 1.8.  This will allow you to create a working Java package even if the build fails with "javadoc" error.

More Answers (0)

Categories

Find more on Java Package Integration in Help Center and File Exchange

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!