Thread Subject: Call my Java method from Matlab

Subject: Call my Java method from Matlab

From: Rami AbouSleiman

Date: 27 Aug, 2011 03:10:32

Message: 1 of 2

Hi,

I created a Java method and I am trying to run it in Matlab. First I cant modify the file classpath.txt, but its no problem I added the java path dynamically to:
C:\Java\jdk1.7.0\Projects

My second problem is that I cant import my class: I get the following error:
??? Error using ==> import
Import argument 'Java_Matlab' cannot be found or cannot be imported.

Any clue? Is it possible that Matlab cannot understand my class file?
Is there any good documents to explain the whole process, at mathworks website they mostly speak about adding the path with no examples on adding your own class. The only post I found was one from MIT:
http://ocw.mit.edu/courses/mathematics/18-413-error-correcting-codes-laboratory-spring-2004/tools/javamatlab.pdf

Thank you all for the help

Subject: Call my Java method from Matlab

From: Rami AbouSleiman

Date: 27 Aug, 2011 03:17:29

Message: 2 of 2

"Rami AbouSleiman" <rdabousl@oakland.edu> wrote in message <j39n77$qg2$1@newscl01ah.mathworks.com>...
> Hi,
>
> I created a Java method and I am trying to run it in Matlab. First I cant modify the file classpath.txt, but its no problem I added the java path dynamically to:
> C:\Java\jdk1.7.0\Projects
>
> My second problem is that I cant import my class: I get the following error:
> ??? Error using ==> import
> Import argument 'Java_Matlab' cannot be found or cannot be imported.
>
> Any clue? Is it possible that Matlab cannot understand my class file?
> Is there any good documents to explain the whole process, at mathworks website they mostly speak about adding the path with no examples on adding your own class. The only post I found was one from MIT:
> http://ocw.mit.edu/courses/mathematics/18-413-error-correcting-codes-laboratory-spring-2004/tools/javamatlab.pdf
>
> Thank you all for the help

BTW I am using:
MATLAB Version 7.9.0.529 (R2009b)
Operating System: Microsoft Windows Vista Version 6.1 (Build 7601: Service Pack 1)
Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com