MATLAB: Are the custom classes not recognized in MATLAB 6.5 (R13)

classjavaMATLABpath

Why are my custom classes not recognized in MATLAB 6.5 (R13)?
I have a java class I want to call from MATLAB. I have added the directory where the class is to my classpath.txt file. However, I am still not able to call the class from MATLAB. For example:
o=HelloWorld
I get
??? Undefined function or variable 'HelloWorld'.

Best Answer

This can happen if you do not put a trailing / at the end of the directory listing in your classpath.txt file. If you want to add
/home/user/somedir
to your classpath.txt file, you should add it as follows (note the last /)
/home/user/somedir/