Why do I get error: package com.mathworks.toolbox.javabuilder.internal does not exist in Java program which uses MATLAB Compiled JARs
4 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2018 年 2 月 6 日
回答済み: MathWorks Support Team
2018 年 2 月 6 日
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?
採用された回答
MathWorks Support Team
2018 年 2 月 6 日
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!