Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
NEED HELP

Subject: NEED HELP

From: Ranu Kundu

Date: 17 Mar, 2010 11:52:06

Message: 1 of 5

Hi,
I am tring to develop an interface in JAVA which will call matlab functions.I have followed http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html.But after running the code it is giving the following error:
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: com/mathworks/util/FactoryUtilSupplier
        at MatlabControl.<init>(MatlabControl.java:69)
        at MatlabControl.<init>(MatlabControl.java:63)
        at MatlabControl.<init>(MatlabControl.java:59)
        at testmat$1Call.run(testmat.java:23)
Caused by: java.lang.ClassNotFoundException: com.mathworks.util.FactoryUtilSupplier
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)


Can you please help me out.It is really urgent.

Subject: NEED HELP

From: TideMan

Date: 17 Mar, 2010 18:59:31

Message: 2 of 5

On Mar 18, 12:52 am, "Ranu Kundu" <anu.ku...@gmail.com> wrote:
> Hi,
> I am tring to develop an interface in JAVA which will call matlab functions.I have followedhttp://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html.Butafter running the code it is giving the following error:
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError: com/mathworks/util/FactoryUtilSupplier
>         at MatlabControl.<init>(MatlabControl.java:69)
>         at MatlabControl.<init>(MatlabControl.java:63)
>         at MatlabControl.<init>(MatlabControl.java:59)
>         at testmat$1Call.run(testmat.java:23)
> Caused by: java.lang.ClassNotFoundException: com.mathworks.util.FactoryUtilSupplier
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
> Can you please help me out.It is really urgent.

Perhaps the reason you have received no help is your silly subject
title all in caps (shouting) has turned people off. Think of a title
that better describes your problem and use normal scripting (caps at
the start of words only).

Nobody here cares that your need is "really urgent".
Lack of planning on your part does not constitute a crisis on ours.

Subject: NEED HELP

From: Yair Altman

Date: 17 Mar, 2010 21:33:21

Message: 3 of 5

"Ranu Kundu" <anu.kundu@gmail.com> wrote in message <hnqfp6$24n$1@fred.mathworks.com>...
> Hi,
> I am tring to develop an interface in JAVA which will call matlab functions.I have followed http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html.But after running the code it is giving the following error:
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError: com/mathworks/util/FactoryUtilSupplier
> at MatlabControl.<init>(MatlabControl.java:69)
> at MatlabControl.<init>(MatlabControl.java:63)
> at MatlabControl.<init>(MatlabControl.java:59)
> at testmat$1Call.run(testmat.java:23)
> Caused by: java.lang.ClassNotFoundException: com.mathworks.util.FactoryUtilSupplier
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>
> Can you please help me out.It is really urgent.


Try the following utility, which is the latest state-of-the-art in JMI (Java-to-Matlab integration): http://code.google.com/p/matlabcontrol/

Also follow http://UndocumentedMatlab.com - I plan to run a couple of JMI articles in the upcoming weeks.

Yair Altman
http://UndocumentedMatlab.com

p.s. - I second the good advice given by TideMan - you will be smart to heed his advise in the future.

Subject: NEED HELP

From: Ranu Kundu

Date: 18 Mar, 2010 05:40:07

Message: 4 of 5

"Ranu Kundu" <anu.kundu@gmail.com> wrote in message <hnqfp6$24n$1@fred.mathworks.com>...
> Hi,
> I am tring to develop an interface in JAVA which will call matlab functions.I have followed http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html.But after running the code it is giving the following error:
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError: com/mathworks/util/FactoryUtilSupplier
> at MatlabControl.<init>(MatlabControl.java:69)
> at MatlabControl.<init>(MatlabControl.java:63)
> at MatlabControl.<init>(MatlabControl.java:59)
> at testmat$1Call.run(testmat.java:23)
> Caused by: java.lang.ClassNotFoundException: com.mathworks.util.FactoryUtilSupplier
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>
> Can you please help me out.It is really urgent.






Yea thanks 4 ur "SOUND" advice..I posted it 4 3 times....got NO reply...neway thanks...

Subject: NEED HELP

From: Cadir

Date: 4 May, 2011 11:04:04

Message: 5 of 5

Hi Ranu,

I have the same problem.

I used "import com.mathworks.jmi.*;"

The execution fails with this simple expression:

Matlab.mtEval("sqrt(5)", 1);

I don't know what is happening. Could you someone help me please?

Greetings


"Ranu Kundu" wrote in message <hnqfp6$24n$1@fred.mathworks.com>...
> Hi,
> I am tring to develop an interface in JAVA which will call matlab functions.I have followed http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html.But after running the code it is giving the following error:
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError: com/mathworks/util/FactoryUtilSupplier
> at MatlabControl.<init>(MatlabControl.java:69)
> at MatlabControl.<init>(MatlabControl.java:63)
> at MatlabControl.<init>(MatlabControl.java:59)
> at testmat$1Call.run(testmat.java:23)
> Caused by: java.lang.ClassNotFoundException: com.mathworks.util.FactoryUtilSupplier
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>
> Can you please help me out.It is really urgent.

Tags for this Thread

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.

Contact us