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
To complement the accepted answer - there's a far better way to check if java class was loaded propertly, than through import
command. Use whereisjavaclassloadingfrom
function, provided by Andrew Janke in this answer.
Not only it will tell you whether the class is loaded, it will list all jars that this class is available in. It happens quite often that your class gets masked / overshadowed by another class with the same package/name, located in a different jar. That can happen e.g. if you try to use a newer library than one of those shipped with Matlab, and do not place it above the original one on the static java classpath.