http://www.mathworks.com/matlabcentral/newsreader/view_thread/269122
MATLAB Central Newsreader  Difficulty using own Java Classes
Feed for thread: Difficulty using own Java Classes
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sun, 27 Dec 2009 01:52:03 +0000
Difficulty using own Java Classes
http://www.mathworks.com/matlabcentral/newsreader/view_thread/269122#704557
Tim Edge
Hi all,<br>
<br>
I am trying to make use of some java classes I have compiled (including MatlabControl, ref:<a href="http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html">http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html</a>) and experiencing some difficulty.<br>
<br>
What I have done is; edited the classpath to the folder with the class and updated the version of JVM running on Matlab.<br>
<br>
It seems that Matlab doesn't recognise any additional classes I want to use. For instance, when i type 'methods('className');' it says no methods or no class. I have tried editing both the static and dynamic classpaths. This is oa problem since MatlabControl objects for instance need to be created from Matlabs JVM.<br>
<br>
For background info, i am using Netbeans IDE 6.1 w/ Java 1.6.7 and Matlab ver 7.0 (R14) with JVM updated to 1.6.7.<br>
<br>
Is there anything obvious I am missing or need to do. Any help would would be great!<br>
<br>
tks,

Sun, 10 Jan 2010 18:31:11 +0000
Re: Difficulty using own Java Classes
http://www.mathworks.com/matlabcentral/newsreader/view_thread/269122#707439
Ed Yu
Tim,<br>
<br>
Try MATLAB command 'javaclasspath'.<br>
<br>
Ed.

Thu, 04 Feb 2010 22:22:04 +0000
Re: Difficulty using own Java Classes
http://www.mathworks.com/matlabcentral/newsreader/view_thread/269122#714151
Lee Blanton
I have the same problem. I added to my classpath.txt file the following statement:<br>
E:\PROGRAMMING\SOURCES_Java\Java_User_Libs\com<br>
<br>
The javaclasspath command reports this as a valid Java path but none of the .class files under this path are recognized.

Fri, 05 Feb 2010 09:54:07 +0000
Re: Difficulty using own Java Classes
http://www.mathworks.com/matlabcentral/newsreader/view_thread/269122#714265
Yair Altman
"Lee Blanton" <lee.blanton@gaasi.com> wrote in message <hkfhac$frd$1@fred.mathworks.com>...<br>
> I have the same problem. I added to my classpath.txt file the following statement:<br>
> E:\PROGRAMMING\SOURCES_Java\Java_User_Libs\com<br>
> <br>
> The javaclasspath command reports this as a valid Java path but none of the .class files under this path are recognized.<br>
<br>
Try placing your class/jar files in the static path (not the dynamic path) and restart Matlab  this usually solves most of these sort of problems. You can also check whether you defined a relevant public constructor  if your constructor is private/protected it is inaccessible from the Matlab command prompt.<br>
<br>
Yair Altman<br>
<a href="http://UndocumentedMatlab.com">http://UndocumentedMatlab.com</a>