Why do I get error: package com.mathworks.toolbox.javabuilder.internal does not exist in Java program which uses MATLAB Compiled JARs
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 6 de Feb. de 2018
Respondida: MathWorks Support Team
el 6 de Feb. de 2018
I created JAR file from MATLAB using example given on the following doc-
But, in Step 16 I am getting the error-
error: package com.mathworks.toolbox.javabuilder.internal does not exist
How to fix this?
Respuesta aceptada
MathWorks Support Team
el 6 de Feb. de 2018
I understand that you created the JAR file from MATLAB code and now trying to import this into a sample JAVA program.
While compiling the program you get the error-
error: package com.mathworks.toolbox.javabuilder.internal does not exist
import com.mathworks.toolbox.javabuilder.*;
^
and cannot find symbol errors for MWArray and MWNumericArray.
This all happens because the import com.mathworks.toolbox.javabuilder could not successfully import javabuilder.
The most possible reason for this is that full path to "javabuilder.jar" is not added to the _classpath_.
Compile your program as-
javac -classpath _"mcrroot_\toolbox\javabuilder\jar\javabuilder.jar";.\makesqr.jar .\getmagic.java
Note that _mcrroot _is the path to where the MATLAB Runtime is installed on your system. If you have MATLAB installed on your system instead, you can use the path to your MATLAB installation
Verify that javabuilder.jar file exists on the location.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Deploy to C++ Applications Using mwArray API (C++03) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!