Why do I receive the error "...cannot find symbol" or "The method...in the type...is not applicable for the arguments..." when running a program compiled with MATLAB Compiler SDK?
Show older comments
I have created a MATLAB function that accepts two input arguments:
function y = simpleAdd(a,b)
y = a + b;
Using MATLAB Compiler SDK, I create a JAR component, which I try to use in a Java application.
However, when I try to call my compiled MATLAB function from Java I get the following run-time error messages.
From the command prompt, the error is in the form:
ERROR: <Class_Name>:<Line_Number>: cannot find symbol
Specifically:
ERROR: C:\Program Files\Java\jdk1.6.0_18\bin>javac -classpath javabuilder.jar;addarrays
project.jar mainclassaddarray.java
mainclassaddarray.java:50: cannot find symbol
symbol : method addarrays(com.mathworks.toolbox.javabuilder.MWNumericArray,com.
mathworks.toolbox.javabuilder.MWNumericArray)
From the Eclipse IDE, the error is in the form:
ERROR: The method <Method_Signature> in the type <Class_Name> is not applicable for the arguments <Argument_List>
Specifically:
ERROR: "The method addarrays(List, List) in the type AddArray is not applicable for the arguments (MWNumericArray, MWNumericArray)"
Accepted Answer
More Answers (0)
Categories
Find more on COM Component Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!