I have a problem that is driving me nuts. Matlab sees only some of my classes embeded in a JAR file
If I compile the classes outside of a package and add the path to
I eventually found the problem which cannot be seen above. The problem (not documented anywhere) was that some of my classes use external packages that I had not imported into Matlab. I was not planning on using any of the functionalities linked with these packages.
Nevertheless, the Matlab error message that it cannot find the class is puzzling. An error message indicating that the class cannot be used because some packages are not referenced would be most useful.
If your package uses external packages, make sure to include all of the relevant jar files in the java classpath or Matlab will not see your dependent classes.
Another tip that I found useful is that the Matlab function "import" will not return an error if you enter a package that does not exist, e.g., import java.doesnotexist.*
works fine. However, import java.doesnotexist.aclass
will not work.
Jason