f



problems calling java in matlab #2

Hi,

I have a problem with calling Java from matlab, I'm using version 6
of matlab which is running version 1.1.8 of java. I wrote a simple
class to use in a program of mine, just once class, not part of a
package or anything, and I add the directory of where it is into
classpath.txt, then restart matlab. However, I can still not create
an instance of the class, even when I try and create it two different
ways:

>> PauseClass(1)
??? Undefined function or variable 'PauseClass'.

javaObject('PauseClass', 1)
??? Error using ==> javaObject
No class PauseClass can be located on Java class path.

I'm at a loss as to why this isn't being found on the classpath. For
reference here is my class (the timer in matlab is too inaccurate, so
I had to write my own). It compiles fine and I've tested it:

class PauseClass extends Thread
{
public PauseClass(int secs)
{
try
{
sleep(secs * 1000);
}
catch(InterruptedException e)
{
return;
}
}
}

does anyone know what's going on or how to correct it? Any help would
be appreciated. Thanks.
0
fowler.mat (11)
3/14/2005 3:42:44 PM
comp.soft-sys.matlab 211264 articles. 26 followers. lunamoonmoon (257) is leader. Post Follow

0 Replies
584 Views

Similar Articles

[PageSpeed] 36

Reply: