For Programmers: Free Programming Magazines  


Home > Archive > Matlab > April 2005 > Matlab 6.5.1 not working with Java 1.5.0









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Matlab 6.5.1 not working with Java 1.5.0
Tim

2005-04-26, 9:02 am

I am using matlab code, which calls java object Obsid to make some
calculations, like this:

o = Obsid('obsid.ini');
....
value = o.evaluate(nData(1), nData(2), nData(3));

This all worked fine, when I had Java version 1.4.1, but now after
updating to Java 1.5.0 it doesnt work anymore.
Matlab says only: "??? Undefined function or variable 'Obsid'.",
although freshly compiled .class files exist in the same folder as is
the matlab code, and this folder is also set in matlabs path and
system classpath.
Anyhow I can call basic java classes without problems, example below
works fine:
m = java.lang.String('foo');

What might be the problem with my system?
Bob Gilmore

2005-04-26, 4:04 pm

"Tim" <nospam@hotmail.com> wrote in message
news:ef0408e.-1@webx.raydaftYaTP...
>I am using matlab code, which calls java object Obsid to make some
> calculations, like this:
>
> o = Obsid('obsid.ini');
> ...
> value = o.evaluate(nData(1), nData(2), nData(3));
>
> This all worked fine, when I had Java version 1.4.1, but now after
> updating to Java 1.5.0 it doesnt work anymore.
> Matlab says only: "??? Undefined function or variable 'Obsid'.",
> although freshly compiled .class files exist in the same folder as is
> the matlab code, and this folder is also set in matlabs path and
> system classpath.
> Anyhow I can call basic java classes without problems, example below
> works fine:
> m = java.lang.String('foo');
>
> What might be the problem with my system?


A few questions:
(1) When you say that you "updated to Java 1.5," what do you mean? That you
installed Java 1.5 on your machine, and are using it to compile your code?
Or something else?

(2) What do you get in MATLAB when you run[color=darkred]

(3) What OS are you running MATLAB on?
--
Bob Gilmore, Software Engineer,
The MathWorks, Inc.


Tim

2005-04-26, 8:59 pm

> A few questions:
> (1) When you say that you "updated to Java 1.5," what do you mean?
> That you
> installed Java 1.5 on your machine, and are using it to compile
> your code?
> Or something else?

I installed java 1.5 and compiled my code using that version.

> (2) What do you get in MATLAB when you run
Matlab says: >> version -java
ans =
Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
(mixed mode)
[color=darkred]
> (3) What OS are you running MATLAB on?

Windows XP

So obviously my Matlab is running different version of Java, and
these two are not incompatible. Can Matlab Java be somehow updated?
Sean Cote

2005-04-27, 4:03 pm

Hi Tim,

I think I found a solution that should help you. I found it by going to The
MathWorks support site and searching for "java version":

http://www.mathworks.com/access/hel...l/ch05mat3.html

Good luck!
Sean

"Tim" <nospam@hotmail.com> wrote in message
news:ef0408e.1@webx.raydaftYaTP...
> I installed java 1.5 and compiled my code using that version.
>
> Matlab says: >> version -java
> ans =
> Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
> (mixed mode)
>
> Windows XP
>
> So obviously my Matlab is running different version of Java, and
> these two are not incompatible. Can Matlab Java be somehow updated?



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com