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:
Matlab ignoring javaclasspath.txt (Micro manager)

Subject: Matlab ignoring javaclasspath.txt (Micro manager)

From: Joseph Gallagher

Date: 4 Jun, 2014 09:32:09

Message: 1 of 3


I have micro manager installed on my pc and I am trying to communicate with it through matlab. This works great on many of the pcs in my lab except for one, and I can't figure out why.

I have followed all the instructions posted here carefully:
https://micro-manager.org/wiki/Matlab_Configuration

The problem seems to be that Matlab is ignoring the paths I have added to the static java class path.

Micro manager works great itself.
"which javaclasspath.txt" gives me the correct file I have listed the paths on
"edit javaclasspath.txt" opens the file with the list I created

but when I type "javaclasspath" to view the list of static paths all of the paths in javaclasspath.txt are ignored.

Can anyone help me please?

My matlab version: R2011b
System: Win xp 32 bit
Micromanager version; 1.4.11
 

Subject: Matlab ignoring javaclasspath.txt (Micro manager)

From: Steven Lord

Date: 4 Jun, 2014 14:38:42

Message: 2 of 3


"Joseph Gallagher" <j.gallagher.nz@gmail.com> wrote in message
news:lmmp2o$ja5$1@newscl01ah.mathworks.com...
>
> I have micro manager installed on my pc and I am trying to communicate
> with it through matlab. This works great on many of the pcs in my lab
> except for one, and I can't figure out why.
>
> I have followed all the instructions posted here carefully:
> https://micro-manager.org/wiki/Matlab_Configuration
>
> The problem seems to be that Matlab is ignoring the paths I have added to
> the static java class path.
>
> Micro manager works great itself.
> "which javaclasspath.txt" gives me the correct file I have listed the
> paths on
> "edit javaclasspath.txt" opens the file with the list I created
>
> but when I type "javaclasspath" to view the list of static paths all of
> the paths in javaclasspath.txt are ignored.
>
> Can anyone help me please?

You DID restart MATLAB after modifying javaclasspath.txt, correct?

http://www.mathworks.com/help/matlab/matlab_external/bringing-java-classes-and-methods-into-matlab-workspace.html#f111065

"Note: MATLAB reads the static class path only at startup. If you edit
javaclasspath.txt or change your .class files while MATLAB is running,
restart MATLAB to put those changes into effect."

You created/updated the correct javaclasspath.txt, in either the preferences
directory associated with the version of MATLAB in which you're trying to
use the classes or in the MATLAB startup folder, correct?

Finally, check that you're not launching MATLAB with the -nouserjavapath
flag.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Matlab ignoring javaclasspath.txt (Micro manager)

From: Joseph Gallagher

Date: 10 Jul, 2014 14:25:17

Message: 3 of 3

"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <lmnb1p$683$1@newscl01ah.mathworks.com>...
>
> "Joseph Gallagher" <j.gallagher.nz@gmail.com> wrote in message
> news:lmmp2o$ja5$1@newscl01ah.mathworks.com...
> >
> > I have micro manager installed on my pc and I am trying to communicate
> > with it through matlab. This works great on many of the pcs in my lab
> > except for one, and I can't figure out why.
> >
> > I have followed all the instructions posted here carefully:
> > https://micro-manager.org/wiki/Matlab_Configuration
> >
> > The problem seems to be that Matlab is ignoring the paths I have added to
> > the static java class path.
> >
> > Micro manager works great itself.
> > "which javaclasspath.txt" gives me the correct file I have listed the
> > paths on
> > "edit javaclasspath.txt" opens the file with the list I created
> >
> > but when I type "javaclasspath" to view the list of static paths all of
> > the paths in javaclasspath.txt are ignored.
> >
> > Can anyone help me please?
>
> You DID restart MATLAB after modifying javaclasspath.txt, correct?
>
> http://www.mathworks.com/help/matlab/matlab_external/bringing-java-classes-and-methods-into-matlab-workspace.html#f111065
>
> "Note: MATLAB reads the static class path only at startup. If you edit
> javaclasspath.txt or change your .class files while MATLAB is running,
> restart MATLAB to put those changes into effect."
>
> You created/updated the correct javaclasspath.txt, in either the preferences
> directory associated with the version of MATLAB in which you're trying to
> use the classes or in the MATLAB startup folder, correct?
>
> Finally, check that you're not launching MATLAB with the -nouserjavapath
> flag.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Thanks for your reply.
Yes, I have restarted matlab, I have made sure I have the correct javaclasspath.txt and there are no flags for matlab launch.
I have just done the same thing on a Windows 7 pc and there were no problems, the classes are now added to the static path.

However on my setup this does not work and I have no idea why?
(Win XP 32, matlab 2011b)

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