Trying to call this function from matlab
package a.b;
public class TestFunction {
public TestFunction(){
}
public static void HelloWorld() {
System.out.println("Hello, World");
}
}
I compiled it and got a class file:
[idf@localhost b]$ ls
TestFunction.class TestFunction.java
[idf@localhost b]$ pwd
/home/idf/Documents/java/a/b
[idf@localhost b]$
I added the path to the parent directory in matlab
javaaddpath('/home/idf/Documents/java/')
If I try to import the package or call it I get errors:
>> import a.b
Error using import
Import argument 'a.b' cannot be found or cannot be imported.
How do I call the java
function TestFunction.HelloWorld
from matlab
?