<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261</link>
    <title>MATLAB Central Newsreader - Debugging java class called from Matlab</title>
    <description>Feed for thread: Debugging java class called from Matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 28 Aug 2007 15:58:44 -0400</pubDate>
      <title>Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#389714</link>
      <author>Yair Altman</author>
      <description>Hello all,&lt;br&gt;
&lt;br&gt;
I wish to debug a Java class that I call from Matlab. Is&lt;br&gt;
there any way to connect Eclipse (or something else) to set&lt;br&gt;
debuggable breakpoints in my Java code?&lt;br&gt;
&lt;br&gt;
(simple system.out.println works of course, but I need a&lt;br&gt;
more heavy-duty debugger)&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Yair Altman</description>
    </item>
    <item>
      <pubDate>Fri, 30 Nov 2007 21:05:08 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#404006</link>
      <author>Ed Yu</author>
      <description>&quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fb1gnk$5o4$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I wish to debug a Java class that I call from Matlab. Is&lt;br&gt;
&amp;gt; there any way to connect Eclipse (or something else) to set&lt;br&gt;
&amp;gt; debuggable breakpoints in my Java code?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (simple system.out.println works of course, but I need a&lt;br&gt;
&amp;gt; more heavy-duty debugger)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Yair Altman&lt;br&gt;
&lt;br&gt;
Hi Yair,&lt;br&gt;
&lt;br&gt;
I just figured out how to do it for MATLAB 7R14 (should work&lt;br&gt;
for later versions) and Eclipse (I'm using JBuilder 2007,&lt;br&gt;
which is Eclipse 3.2.2). Here is how:&lt;br&gt;
&lt;br&gt;
1) Create a Eclipse project (you must use JDK 1.5 or above)&lt;br&gt;
to include the source code of your java classes, remember&lt;br&gt;
the directory where you put the output classes when you&lt;br&gt;
define your project.&lt;br&gt;
&lt;br&gt;
2) Add the following flags in java.opts in directory&lt;br&gt;
%MATLAB_ROO%\bin\arch.&lt;br&gt;
&lt;br&gt;
-Xdebug&lt;br&gt;
-Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n&lt;br&gt;
&lt;br&gt;
3) In your eclipse project, define a debug configuration.&lt;br&gt;
For me, I've to add a &quot;Remote Java Application&quot;&lt;br&gt;
configuration. In the &quot;Connection Type&quot; field, use &quot;Standard&lt;br&gt;
(Socket Attach)&quot;. Then use &quot;localhost&quot; for field &quot;Host&quot; and&lt;br&gt;
&quot;1044&quot; for &quot;Port&quot;.&lt;br&gt;
&lt;br&gt;
4) Then launch MATLAB, make sure you add the directory of&lt;br&gt;
the output classes from step 1 into MATLAB's javaclasspath.&lt;br&gt;
You can use either static or dynamic classpath here.&lt;br&gt;
&lt;br&gt;
5) Then debug the &quot;Remote Java Application&quot; on the Eclipse&lt;br&gt;
side, put a break point in your java code and instantiate or&lt;br&gt;
execute your java code from within MATLAB. You should see&lt;br&gt;
the breakpoint popping up when MATLAB calls java.&lt;br&gt;
&lt;br&gt;
Have fun!</description>
    </item>
    <item>
      <pubDate>Fri, 07 Mar 2008 16:11:02 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#419634</link>
      <author>Ed Yu</author>
      <description>I just found out that port 1044 is very popular (used by&lt;br&gt;
many software) which causes MATLAB not to launch if there is&lt;br&gt;
any other process is using the port. So changing it to&lt;br&gt;
something else would be a good idea.</description>
    </item>
    <item>
      <pubDate>Wed, 16 Apr 2008 16:19:03 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#427003</link>
      <author>Ed Yu</author>
      <description>&quot;Ed Yu&quot; &amp;lt;ekyu88@hotmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fqrpem$r2s$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I just found out that port 1044 is very popular (used by&lt;br&gt;
&amp;gt; many software) which causes MATLAB not to launch if there is&lt;br&gt;
&amp;gt; any other process is using the port. So changing it to&lt;br&gt;
&amp;gt; something else would be a good idea.&lt;br&gt;
&lt;br&gt;
Also a good idea to use the follow flag to disable JIT compiler:&lt;br&gt;
&lt;br&gt;
-Djava.compiler=NONE</description>
    </item>
    <item>
      <pubDate>Fri, 01 Aug 2008 15:32:02 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#446766</link>
      <author>Aleks </author>
      <description>&quot;Ed Yu&quot; &amp;lt;ekyu88@hotmail.com&amp;gt; wrote in message &amp;lt;fiptu4&lt;br&gt;
$l3b$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in &lt;br&gt;
message&lt;br&gt;
&amp;gt; &amp;lt;fb1gnk$5o4$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello all,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I wish to debug a Java class that I call from Matlab. Is&lt;br&gt;
&amp;gt; &amp;gt; there any way to connect Eclipse (or something else) to &lt;br&gt;
set&lt;br&gt;
&amp;gt; &amp;gt; debuggable breakpoints in my Java code?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; (simple system.out.println works of course, but I need a&lt;br&gt;
&amp;gt; &amp;gt; more heavy-duty debugger)&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi Yair,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I just figured out how to do it for MATLAB 7R14 (should &lt;br&gt;
work&lt;br&gt;
&amp;gt; for later versions) and Eclipse (I'm using JBuilder 2007,&lt;br&gt;
&amp;gt; which is Eclipse 3.2.2). Here is how:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 1) Create a Eclipse project (you must use JDK 1.5 or &lt;br&gt;
above)&lt;br&gt;
&amp;gt; to include the source code of your java classes, remember&lt;br&gt;
&amp;gt; the directory where you put the output classes when you&lt;br&gt;
&amp;gt; define your project.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 2) Add the following flags in java.opts in directory&lt;br&gt;
&amp;gt; %MATLAB_ROO%\bin\arch.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -Xdebug&lt;br&gt;
&amp;gt; -&lt;br&gt;
Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 3) In your eclipse project, define a debug configuration.&lt;br&gt;
&amp;gt; For me, I've to add a &quot;Remote Java Application&quot;&lt;br&gt;
&amp;gt; configuration. In the &quot;Connection Type&quot; field, &lt;br&gt;
use &quot;Standard&lt;br&gt;
&amp;gt; (Socket Attach)&quot;. Then use &quot;localhost&quot; for field &quot;Host&quot; &lt;br&gt;
and&lt;br&gt;
&amp;gt; &quot;1044&quot; for &quot;Port&quot;.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 4) Then launch MATLAB, make sure you add the directory of&lt;br&gt;
&amp;gt; the output classes from step 1 into MATLAB's &lt;br&gt;
javaclasspath.&lt;br&gt;
&amp;gt; You can use either static or dynamic classpath here.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 5) Then debug the &quot;Remote Java Application&quot; on the Eclipse&lt;br&gt;
&amp;gt; side, put a break point in your java code and instantiate &lt;br&gt;
or&lt;br&gt;
&amp;gt; execute your java code from within MATLAB. You should see&lt;br&gt;
&amp;gt; the breakpoint popping up when MATLAB calls java.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Have fun!&lt;br&gt;
&lt;br&gt;
Works quite well, thanks! Also, helps to remember to &lt;br&gt;
compile with -g flag as usual, to generate the debugging &lt;br&gt;
info. (javac -g YourBuggyCode.java)</description>
    </item>
    <item>
      <pubDate>Mon, 04 Aug 2008 08:46:46 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#447101</link>
      <author>siva</author>
      <description>Hi, &lt;br&gt;
&lt;br&gt;
Please help me in getting the second point mentioned above. I am not able to find the path %MATLAB_ROO%\bin\arch.&lt;br&gt;
Please explain me more....&lt;br&gt;
&lt;br&gt;
Thanks in advance</description>
    </item>
    <item>
      <pubDate>Tue, 10 Mar 2009 21:39:01 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#633890</link>
      <author>Ed Yu</author>
      <description>&quot;Holger &quot; &amp;lt;hneuhaus@web.de&amp;gt; wrote in message &amp;lt;gcv6m1$b08$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For debugging java classes: Does anybody know if / how it is possible to connect Eclipse 3.2.1 and MATLAB 6.0.0.88 (R12) on Windows ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any help would be really appreciated.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; BR,&lt;br&gt;
&amp;gt; Holger&lt;br&gt;
&lt;br&gt;
Probably not earlier versions of MATLAB. The actual constraint is the version of Java bundled with the version MATLAB. As long as the JVM (or JRE) is version 1.5.0 and above (which supports remote debugging), this should work fine.</description>
    </item>
    <item>
      <pubDate>Tue, 16 Sep 2008 21:49:02 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#600628</link>
      <author>Kenneth </author>
      <description>This seems like a good idea, but it didn't work for me.  I believe I followed the instructions, but when I run the launcher in Eclipse, I get a dialog saying:&lt;br&gt;
&lt;br&gt;
Failure to connect to remote VM.  Connection refused.&lt;br&gt;
Connection refused: connect&lt;br&gt;
&lt;br&gt;
This happens whether Matlab is started before the launcher or after.&lt;br&gt;
&lt;br&gt;
I made the file java.opts in C:\Program Files\Matlab\2007a\bin\win32.&lt;br&gt;
&lt;br&gt;
Possible reasons:&lt;br&gt;
&lt;br&gt;
1. I tried putting the opts on one line or on multiple lines as in the forum message.  I also tried with and without -Djava.compiler=NONE. (So should it be one line or multiple lines? I can't find any good documentation on java.opts.)  This is my current choice:&lt;br&gt;
&lt;br&gt;
-Xdebug&lt;br&gt;
-Xrunjdwp:transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
-Djava.compiler=NONE&lt;br&gt;
&lt;br&gt;
2. I am using 7.4.0.287 (R2007a).  The forum says MATLAB 7R14.  (I don't understand this numbering.)  Is my version too old?&lt;br&gt;
&lt;br&gt;
3. I am using Eclipse 3.3.2.&lt;br&gt;
&lt;br&gt;
4. I have tried several different ports. 1044 is not currently in use on my machine, however.&lt;br&gt;
&lt;br&gt;
Any help would be appreciated.  I've run out of ideas, and I can't find this documented anywhere else.&lt;br&gt;
&lt;br&gt;
Thanks.</description>
    </item>
    <item>
      <pubDate>Thu, 25 Sep 2008 18:31:46 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#602139</link>
      <author>Andy Johnson</author>
      <description>Try the following in java.opts:&lt;br&gt;
-agentlib:jdwp=transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
&lt;br&gt;
The -Xrunjdwp option is deprecated.&lt;br&gt;
&lt;br&gt;
-AndyJ&lt;br&gt;
&lt;br&gt;
&quot;Kenneth &quot; &amp;lt;nomail@email.com&amp;gt; wrote in message &lt;br&gt;
news:gap9ke$gne$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; This seems like a good idea, but it didn't work for me.  I believe I &lt;br&gt;
&amp;gt; followed the instructions, but when I run the launcher in Eclipse, I get a &lt;br&gt;
&amp;gt; dialog saying:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Failure to connect to remote VM.  Connection refused.&lt;br&gt;
&amp;gt; Connection refused: connect&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; This happens whether Matlab is started before the launcher or after.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I made the file java.opts in C:\Program Files\Matlab\2007a\bin\win32.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Possible reasons:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 1. I tried putting the opts on one line or on multiple lines as in the &lt;br&gt;
&amp;gt; forum message.  I also tried with and without -Djava.compiler=NONE. (So &lt;br&gt;
&amp;gt; should it be one line or multiple lines? I can't find any good &lt;br&gt;
&amp;gt; documentation on java.opts.)  This is my current choice:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; -Xdebug&lt;br&gt;
&amp;gt; -Xrunjdwp:transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
&amp;gt; -Djava.compiler=NONE&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 2. I am using 7.4.0.287 (R2007a).  The forum says MATLAB 7R14.  (I don't &lt;br&gt;
&amp;gt; understand this numbering.)  Is my version too old?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 3. I am using Eclipse 3.3.2.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 4. I have tried several different ports. 1044 is not currently in use on &lt;br&gt;
&amp;gt; my machine, however.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any help would be appreciated.  I've run out of ideas, and I can't find &lt;br&gt;
&amp;gt; this documented anywhere else.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks. </description>
    </item>
    <item>
      <pubDate>Thu, 25 Sep 2008 21:04:01 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#602171</link>
      <author>Kenneth Evans</author>
      <description>Andy,&lt;br&gt;
&lt;br&gt;
When I went to try what you suggested, I found the real problem.  I had put java.opts in the wrong bin/arch.  I do apologize.&lt;br&gt;
&lt;br&gt;
It is apparently OK to put the opts on separate lines.  This is what I am now using:&lt;br&gt;
&lt;br&gt;
-Xdebug&lt;br&gt;
-agentlib:jdwp=transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
-Djava.compiler=NONE&lt;br&gt;
&lt;br&gt;
It is truly awesome.  Thanks to you and the others for working this out.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-Ken</description>
    </item>
    <item>
      <pubDate>Mon, 13 Oct 2008 10:08:01 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#604926</link>
      <author>Holger </author>
      <description>Hi.&lt;br&gt;
&lt;br&gt;
For debugging java classes: Does anybody know if / how it is possible to connect Eclipse 3.2.1 and MATLAB 6.0.0.88 (R12) on Windows ?&lt;br&gt;
&lt;br&gt;
Any help would be really appreciated.&lt;br&gt;
&lt;br&gt;
BR,&lt;br&gt;
Holger</description>
    </item>
    <item>
      <pubDate>Mon, 31 Aug 2009 08:06:00 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#676957</link>
      <author>Subha Fernando</author>
      <description>&quot;Andy Johnson&quot; &amp;lt;ajohnson@mathworks.com&amp;gt; wrote in message &amp;lt;gbglel$g7r$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Try the following in java.opts:&lt;br&gt;
&amp;gt; -agentlib:jdwp=transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The -Xrunjdwp option is deprecated.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -AndyJ&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Kenneth &quot; &amp;lt;nomail@email.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:gap9ke$gne$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; This seems like a good idea, but it didn't work for me.  I believe I &lt;br&gt;
&amp;gt; &amp;gt; followed the instructions, but when I run the launcher in Eclipse, I get a &lt;br&gt;
&amp;gt; &amp;gt; dialog saying:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Failure to connect to remote VM.  Connection refused.&lt;br&gt;
&amp;gt; &amp;gt; Connection refused: connect&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; This happens whether Matlab is started before the launcher or after.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I made the file java.opts in C:\Program Files\Matlab\2007a\bin\win32.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Possible reasons:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 1. I tried putting the opts on one line or on multiple lines as in the &lt;br&gt;
&amp;gt; &amp;gt; forum message.  I also tried with and without -Djava.compiler=NONE. (So &lt;br&gt;
&amp;gt; &amp;gt; should it be one line or multiple lines? I can't find any good &lt;br&gt;
&amp;gt; &amp;gt; documentation on java.opts.)  This is my current choice:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; -Xdebug&lt;br&gt;
&amp;gt; &amp;gt; -Xrunjdwp:transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
&amp;gt; &amp;gt; -Djava.compiler=NONE&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 2. I am using 7.4.0.287 (R2007a).  The forum says MATLAB 7R14.  (I don't &lt;br&gt;
&amp;gt; &amp;gt; understand this numbering.)  Is my version too old?&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 3. I am using Eclipse 3.3.2.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 4. I have tried several different ports. 1044 is not currently in use on &lt;br&gt;
&amp;gt; &amp;gt; my machine, however.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Any help would be appreciated.  I've run out of ideas, and I can't find &lt;br&gt;
&amp;gt; &amp;gt; this documented anywhere else.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks. &lt;br&gt;
&amp;gt; &lt;br&gt;
Does anyone know how to debug java classes in Eclipse through Matlab in Vista 64 bit enviornment?&lt;br&gt;
&lt;br&gt;
Subha Fernando</description>
    </item>
    <item>
      <pubDate>Tue, 24 Nov 2009 13:32:23 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#697116</link>
      <author>Holger </author>
      <description>&quot;Ed Yu&quot; &amp;lt;ekyu88@hotmail.com&amp;gt; wrote in message &amp;lt;gp6mll$2mi$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Holger &quot; &amp;lt;hneuhaus@web.de&amp;gt; wrote in message &amp;lt;gcv6m1$b08$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; For debugging java classes: Does anybody know if / how it is possible to connect Eclipse 3.2.1 and MATLAB 6.0.0.88 (R12) on Windows ?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Any help would be really appreciated.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; BR,&lt;br&gt;
&amp;gt; &amp;gt; Holger&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Probably not earlier versions of MATLAB. The actual constraint is the version of Java bundled with the version MATLAB. As long as the JVM (or JRE) is version 1.5.0 and above (which supports remote debugging), this should work fine.&lt;br&gt;
&lt;br&gt;
Hi Ed,&lt;br&gt;
&lt;br&gt;
thanks a lot for your help. Appreciated very much.&lt;br&gt;
&lt;br&gt;
I understood that I need to update the jvm version in order to use remote java debugging with MATLAB 6.0.0.888 (R12) on Windows. This MATLAB version is shipped with java version 1.1.8.&lt;br&gt;
&lt;br&gt;
I've read the related messages in the news group, and set the JAVA_MATLAB env. variable accordingly, etc., but then MATLAB startup fails. I fear that the described solution does not work for MATLAB 6.0.&lt;br&gt;
&lt;br&gt;
Does anybody know if MATlAB 6.0 can be upgraded w.r.t. a jvm version larger than 1.1.8 ?&lt;br&gt;
&lt;br&gt;
BR, Holger</description>
    </item>
    <item>
      <pubDate>Tue, 19 Jan 2010 14:17:05 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#709487</link>
      <author>Fabio </author>
      <description>I'm using Matlab 7.8.0 (R2009)on linux x86_64 and directory %MATLAB_ROOT%\bin\arch doesn't exist !  :-(  &lt;br&gt;
where I have to put the java.opts file ?&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Ed Yu&quot; &amp;lt;ekyu88@hotmail.com&amp;gt; wrote in message &amp;lt;fiptu4$l3b$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Yair Altman&quot; &amp;lt;altmanyDEL@gmailDEL.comDEL&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;fb1gnk$5o4$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello all,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I wish to debug a Java class that I call from Matlab. Is&lt;br&gt;
&amp;gt; &amp;gt; there any way to connect Eclipse (or something else) to set&lt;br&gt;
&amp;gt; &amp;gt; debuggable breakpoints in my Java code?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; (simple system.out.println works of course, but I need a&lt;br&gt;
&amp;gt; &amp;gt; more heavy-duty debugger)&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; Yair Altman&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi Yair,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I just figured out how to do it for MATLAB 7R14 (should work&lt;br&gt;
&amp;gt; for later versions) and Eclipse (I'm using JBuilder 2007,&lt;br&gt;
&amp;gt; which is Eclipse 3.2.2). Here is how:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 1) Create a Eclipse project (you must use JDK 1.5 or above)&lt;br&gt;
&amp;gt; to include the source code of your java classes, remember&lt;br&gt;
&amp;gt; the directory where you put the output classes when you&lt;br&gt;
&amp;gt; define your project.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 2) Add the following flags in java.opts in directory&lt;br&gt;
&amp;gt; %MATLAB_ROO%\bin\arch.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -Xdebug&lt;br&gt;
&amp;gt; -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 3) In your eclipse project, define a debug configuration.&lt;br&gt;
&amp;gt; For me, I've to add a &quot;Remote Java Application&quot;&lt;br&gt;
&amp;gt; configuration. In the &quot;Connection Type&quot; field, use &quot;Standard&lt;br&gt;
&amp;gt; (Socket Attach)&quot;. Then use &quot;localhost&quot; for field &quot;Host&quot; and&lt;br&gt;
&amp;gt; &quot;1044&quot; for &quot;Port&quot;.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 4) Then launch MATLAB, make sure you add the directory of&lt;br&gt;
&amp;gt; the output classes from step 1 into MATLAB's javaclasspath.&lt;br&gt;
&amp;gt; You can use either static or dynamic classpath here.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 5) Then debug the &quot;Remote Java Application&quot; on the Eclipse&lt;br&gt;
&amp;gt; side, put a break point in your java code and instantiate or&lt;br&gt;
&amp;gt; execute your java code from within MATLAB. You should see&lt;br&gt;
&amp;gt; the breakpoint popping up when MATLAB calls java.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Have fun!</description>
    </item>
    <item>
      <pubDate>Tue, 19 Jan 2010 14:29:40 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#709493</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Fabio &quot; &amp;lt;emanuele.guidolotti@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:hj4et1$t0c$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; I'm using Matlab 7.8.0 (R2009)on linux x86_64 and directory &lt;br&gt;
&amp;gt; %MATLAB_ROOT%\bin\arch doesn't exist !  :-(  where I have to put the &lt;br&gt;
&amp;gt; java.opts file ?&lt;br&gt;
&lt;br&gt;
When Yair used the word &quot;arch&quot;, he intended for you to replace that with the &lt;br&gt;
appropriate directory for your platform -- so because you're using 64-bit &lt;br&gt;
Linux, the directory you're looking for is:&lt;br&gt;
&lt;br&gt;
fullfile(matlabroot, 'bin', 'glnxa64')&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 20:57:02 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#715494</link>
      <author>Ed Yu</author>
      <description>I've now upgraded to Vista 64 and the problem is that the MATLAB 2007a launched JVM (1.5.0_05) died whenever I start using either options:&lt;br&gt;
&lt;br&gt;
# old way&lt;br&gt;
#-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044&lt;br&gt;
# new way&lt;br&gt;
#-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5678&lt;br&gt;
&lt;br&gt;
Anyone successfully debug the 64 bit MATLAB (and Java) on Vista 64 or Windows 7 64?&lt;br&gt;
&lt;br&gt;
Ed.</description>
    </item>
    <item>
      <pubDate>Fri, 12 Feb 2010 20:51:09 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#717300</link>
      <author>Ed Yu</author>
      <description>&amp;gt; I've now upgraded to Vista 64 and the problem is that the MATLAB 2007a launched JVM (1.5.0_05) died whenever I start using either options:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; # old way&lt;br&gt;
&amp;gt; #-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044&lt;br&gt;
&amp;gt; # new way&lt;br&gt;
&amp;gt; #-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5678&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Anyone successfully debug the 64 bit MATLAB (and Java) on Vista 64 or Windows 7 64?&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Found a solution... Since I'm running the MATLAB development environment, I've upgraded to the latest 64 bit JDK matching the MATLAB java version (1.5.0 for 2007a) and MATLAB launched with my java.opts file.</description>
    </item>
    <item>
      <pubDate>Tue, 15 Feb 2011 21:49:04 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#819547</link>
      <author>Donald Frankel</author>
      <description>&quot;Andy Johnson&quot; &amp;lt;ajohnson@mathworks.com&amp;gt; wrote in message &amp;lt;gbglel$g7r$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Try the following in java.opts:&lt;br&gt;
&amp;gt; -agentlib:jdwp=transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The -Xrunjdwp option is deprecated.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -AndyJ&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Kenneth &quot; &amp;lt;nomail@email.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:gap9ke$gne$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; This seems like a good idea, but it didn't work for me.  I believe I &lt;br&gt;
&amp;gt; &amp;gt; followed the instructions, but when I run the launcher in Eclipse, I get a &lt;br&gt;
&amp;gt; &amp;gt; dialog saying:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Failure to connect to remote VM.  Connection refused.&lt;br&gt;
&amp;gt; &amp;gt; Connection refused: connect&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; This happens whether Matlab is started before the launcher or after.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I made the file java.opts in C:\Program Files\Matlab\2007a\bin\win32.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Possible reasons:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 1. I tried putting the opts on one line or on multiple lines as in the &lt;br&gt;
&amp;gt; &amp;gt; forum message.  I also tried with and without -Djava.compiler=NONE. (So &lt;br&gt;
&amp;gt; &amp;gt; should it be one line or multiple lines? I can't find any good &lt;br&gt;
&amp;gt; &amp;gt; documentation on java.opts.)  This is my current choice:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; -Xdebug&lt;br&gt;
&amp;gt; &amp;gt; -Xrunjdwp:transport=dt_socket,address=5678,server=y,suspend=n&lt;br&gt;
&amp;gt; &amp;gt; -Djava.compiler=NONE&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 2. I am using 7.4.0.287 (R2007a).  The forum says MATLAB 7R14.  (I don't &lt;br&gt;
&amp;gt; &amp;gt; understand this numbering.)  Is my version too old?&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 3. I am using Eclipse 3.3.2.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 4. I have tried several different ports. 1044 is not currently in use on &lt;br&gt;
&amp;gt; &amp;gt; my machine, however.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Any help would be appreciated.  I've run out of ideas, and I can't find &lt;br&gt;
&amp;gt; &amp;gt; this documented anywhere else.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks. &lt;br&gt;
&amp;gt; &lt;br&gt;
I have the same problem that Kenneth had, &quot;connection refused&quot;. My software versions are:&lt;br&gt;
Matlab 7.11.0.584 (R2010b)&lt;br&gt;
Windows 7 Enterprise&lt;br&gt;
Eclipse IDE for Java Developers 3.6.1. etc.&lt;br&gt;
Java 1.6.0_22&lt;br&gt;
&lt;br&gt;
I don't know how to find the version of JDK installed, if that is different from the other version info above.&lt;br&gt;
&lt;br&gt;
java.opts is at C:\Program Files\MATLAB\R2010b\bin\win64&lt;br&gt;
Its contents are:&lt;br&gt;
-Xdebug -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -Djava.compiler=NONE&lt;br&gt;
&lt;br&gt;
all on one line. (I find that if this is broken into more than one line, Matlab will not launch.) The eclipse debug configuration matches the java.opts socket value. I've tried 5678 also with no greater success.&lt;br&gt;
&lt;br&gt;
It is possible that I have a file access permission problem. Since I must use a managed desktop, I don't normally have permission to modify system files, nor install applications. For example, I had to specifically ask the sysadmin to grant me write permission to create java.opts. If that is the problem, I would need to know what permission to ask for.</description>
    </item>
    <item>
      <pubDate>Tue, 15 Feb 2011 22:53:03 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#819557</link>
      <author>Ed Yu</author>
      <description>Don,&lt;br&gt;
&lt;br&gt;
To find out the version of java MATLAB is installed with, use MATLAB command 'ver java'. For some versions of MATLAB 64 bit, they did not bundle the full java that supports the debug feature. But you seems to have a pretty update version of MATLAB. If you can start MATLAB ok, then use 'netstat -anr' to see if the port is used (8000 in your case) by MATLAB.&lt;br&gt;
Then other possibility would be firewall that blocks ports from Eclipse... You need to have privilege to start up Eclipse and connect to port 8000.&lt;br&gt;
&lt;br&gt;
Good luck!&lt;br&gt;
&lt;br&gt;
Ed.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Donald Frankel&quot; &amp;lt;dfrankel@ll.mit.edu&amp;gt; wrote in message &lt;br&gt;
&amp;gt; I have the same problem that Kenneth had, &quot;connection refused&quot;. My software versions are:&lt;br&gt;
&amp;gt; Matlab 7.11.0.584 (R2010b)&lt;br&gt;
&amp;gt; Windows 7 Enterprise&lt;br&gt;
&amp;gt; Eclipse IDE for Java Developers 3.6.1. etc.&lt;br&gt;
&amp;gt; Java 1.6.0_22&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I don't know how to find the version of JDK installed, if that is different from the other version info above.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; java.opts is at C:\Program Files\MATLAB\R2010b\bin\win64&lt;br&gt;
&amp;gt; Its contents are:&lt;br&gt;
&amp;gt; -Xdebug -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -Djava.compiler=NONE&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; all on one line. (I find that if this is broken into more than one line, Matlab will not launch.) The eclipse debug configuration matches the java.opts socket value. I've tried 5678 also with no greater success.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It is possible that I have a file access permission problem. Since I must use a managed desktop, I don't normally have permission to modify system files, nor install applications. For example, I had to specifically ask the sysadmin to grant me write permission to create java.opts. If that is the problem, I would need to know what permission to ask for.</description>
    </item>
    <item>
      <pubDate>Tue, 15 Feb 2011 22:54:04 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#819558</link>
      <author>Yair Altman</author>
      <description>Donald, modern Matlab releases don't use the java.opts thingy any more.&lt;br&gt;
Here's a quick how-to for debugging with Eclipse:&lt;br&gt;
&lt;br&gt;
1) Create an Eclipse project (you must use JDK 1.5 or above); to include the source code of your Java classes, remember the folder where you put the output classes when you defined your project.&lt;br&gt;
2) Start Matlab with the &amp;#8211;jdb command-line startup option (or on pre-R14 Matlab releases, use the java.opts modification that was explained above).&lt;br&gt;
3) In Matlab, add the folder of the output classes from step 1 into Matlab's javaclasspath. You can use either static or dynamic classpath here.&lt;br&gt;
4) In Eclipse, add a &amp;#8220;Remote Java Application&amp;#8221; debug configuration: Set Connection Type &amp;#8220;Standard (Socket Attach)&amp;#8221;, Host &amp;#8220;localhost&amp;#8221;, Port 4444.&lt;br&gt;
5) Now click the &amp;#8220;Debug&amp;#8221; button to debug the &amp;#8220;Remote Java Application&amp;#8221; in Eclipse. If Eclipse fails to connect to Matlab, you&amp;#8217;ll see an error message; otherwise, you will see no message and will be able to proceed onward.&lt;br&gt;
6) Place a break-point in your Java code within Eclipse.&lt;br&gt;
7) Back in Matlab, instantiate or execute your Java code. You should see the breakpoint popping up in Eclipse when Matlab calls the Java code and reaches the first breakpoint.&lt;br&gt;
&lt;br&gt;
BTW, the steps for NetBeans are somewhat different, but not radically.&lt;br&gt;
&lt;br&gt;
Yair Altman &lt;br&gt;
&lt;a href=&quot;http://UndocumentedMatlab.com&quot;&gt;http://UndocumentedMatlab.com&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Thu, 17 Feb 2011 19:34:04 -0500</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#820027</link>
      <author>Donald Frankel</author>
      <description>&quot;Yair Altman&quot; wrote in message &amp;lt;ijf06c$2dd$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Donald, modern Matlab releases don't use the java.opts thingy any more.&lt;br&gt;
&amp;gt; Here's a quick how-to for debugging with Eclipse:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 1) Create an Eclipse project (you must use JDK 1.5 or above); to include the source code of your Java classes, remember the folder where you put the output classes when you defined your project.&lt;br&gt;
&amp;gt; 2) Start Matlab with the &amp;#8211;jdb command-line startup option (or on pre-R14 Matlab releases, use the java.opts modification that was explained above).&lt;br&gt;
&amp;gt; 3) In Matlab, add the folder of the output classes from step 1 into Matlab's javaclasspath. You can use either static or dynamic classpath here.&lt;br&gt;
&amp;gt; 4) In Eclipse, add a &amp;#8220;Remote Java Application&amp;#8221; debug configuration: Set Connection Type &amp;#8220;Standard (Socket Attach)&amp;#8221;, Host &amp;#8220;localhost&amp;#8221;, Port 4444.&lt;br&gt;
&amp;gt; 5) Now click the &amp;#8220;Debug&amp;#8221; button to debug the &amp;#8220;Remote Java Application&amp;#8221; in Eclipse. If Eclipse fails to connect to Matlab, you&amp;#8217;ll see an error message; otherwise, you will see no message and will be able to proceed onward.&lt;br&gt;
&amp;gt; 6) Place a break-point in your Java code within Eclipse.&lt;br&gt;
&amp;gt; 7) Back in Matlab, instantiate or execute your Java code. You should see the breakpoint popping up in Eclipse when Matlab calls the Java code and reaches the first breakpoint.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; BTW, the steps for NetBeans are somewhat different, but not radically.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yair Altman &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://UndocumentedMatlab.com&quot;&gt;http://UndocumentedMatlab.com&lt;/a&gt; &lt;br&gt;
Thanks, Yair. Now it works!&lt;br&gt;
&lt;br&gt;
Don</description>
    </item>
    <item>
      <pubDate>Fri, 28 Oct 2011 14:10:16 -0400</pubDate>
      <title>Re: Debugging java class called from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155261#856605</link>
      <author>Donald Frankel</author>
      <description>&quot;Donald Frankel&quot; &amp;lt;dfrankel@ll.mit.edu&amp;gt; wrote in message &amp;lt;ijjt7c$o5h$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Yair Altman&quot; wrote in message &amp;lt;ijf06c$2dd$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Donald, modern Matlab releases don't use the java.opts thingy any more.&lt;br&gt;
&amp;gt; &amp;gt; Here's a quick how-to for debugging with Eclipse:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; 1) Create an Eclipse project (you must use JDK 1.5 or above); to include the source code of your Java classes, remember the folder where you put the output classes when you defined your project.&lt;br&gt;
&amp;gt; &amp;gt; 2) Start Matlab with the &#8211;jdb command-line startup option (or on pre-R14 Matlab releases, use the java.opts modification that was explained above).&lt;br&gt;
&amp;gt; &amp;gt; 3) In Matlab, add the folder of the output classes from step 1 into Matlab's javaclasspath. You can use either static or dynamic classpath here.&lt;br&gt;
&amp;gt; &amp;gt; 4) In Eclipse, add a &#8220;Remote Java Application&#8221; debug configuration: Set Connection Type &#8220;Standard (Socket Attach)&#8221;, Host &#8220;localhost&#8221;, Port 4444.&lt;br&gt;
&amp;gt; &amp;gt; 5) Now click the &#8220;Debug&#8221; button to debug the &#8220;Remote Java Application&#8221; in Eclipse. If Eclipse fails to connect to Matlab, you&#8217;ll see an error message; otherwise, you will see no message and will be able to proceed onward.&lt;br&gt;
&amp;gt; &amp;gt; 6) Place a break-point in your Java code within Eclipse.&lt;br&gt;
&amp;gt; &amp;gt; 7) Back in Matlab, instantiate or execute your Java code. You should see the breakpoint popping up in Eclipse when Matlab calls the Java code and reaches the first breakpoint.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; BTW, the steps for NetBeans are somewhat different, but not radically.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Yair Altman &lt;br&gt;
&amp;gt; &amp;gt; &lt;a href=&quot;http://UndocumentedMatlab.com&quot;&gt;http://UndocumentedMatlab.com&lt;/a&gt; &lt;br&gt;
&amp;gt; Thanks, Yair. Now it works!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Don&lt;br&gt;
&lt;br&gt;
This question is off topic, but I didn't know another way: Can a similar debugging scheme be arranged for debuggng C++ classes? I'd like to stay in linux and eclipse for debugging.&lt;br&gt;
Don</description>
    </item>
  </channel>
</rss>

