<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Using Groovy in Matlab	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-groovy-in-matlab</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Sat, 26 Mar 2016 19:49:10 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372867</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Sat, 26 Mar 2016 19:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-372867</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324&quot;&gt;Eric Salemi&lt;/a&gt;.

The fix above works on Windows too but an attempt by the Java runtime to add a key to the Windows registry when Groovy is first launched may give a warning.

Adding the key manually following &lt;a href=&quot;http://www-01.ibm.com/support/docview.wss?uid=swg21496098&quot; rel=&quot;nofollow&quot;&gt;http://www-01.ibm.com/support/docview.wss?uid=swg21496098&lt;/a&gt; solved that for me (Windows 10 with R2016a).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324">Eric Salemi</a>.</p>
<p>The fix above works on Windows too but an attempt by the Java runtime to add a key to the Windows registry when Groovy is first launched may give a warning.</p>
<p>Adding the key manually following <a href="http://www-01.ibm.com/support/docview.wss?uid=swg21496098" rel="nofollow">http://www-01.ibm.com/support/docview.wss?uid=swg21496098</a> solved that for me (Windows 10 with R2016a).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372836</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Sat, 26 Mar 2016 07:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-372836</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324&quot;&gt;Eric Salemi&lt;/a&gt;.

I have found a relatively simple solution.

If this is an issue with dependencies, we might fix the problem by installing groovy-all-2.4.6.jar at MATLAB startup. 

On MATLAB R2016a (on Mac El Capitan for the test) this works if we load either:
1. via a javaclasspath.txt file or
2. by editing classpath.txt

Yair has written about this &lt;a href=&quot;http://undocumentedmatlab.com/blog/static-java-classpath-hacks&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.

So, adding Groovy on MATLAB&#039;s static javaclasspath rather than the dynamic path resolves the problem.

An issue may remain with the resolution of dependent jars. If Groovy and MATLAB ship with different versions of a jar file, which gets loaded and which will get used? 

Adding Groovy as the &lt;em&gt;first&lt;/em&gt; entry in classpath.txt is probably the most robust - but the least attractive - solution. I&#039;d suggest using a javaclasspath.txt file and only editing classpath.txt if problems arise. 

Note that if a newer jar file is being loaded and used via Groovy there could be knock-on effects for any code running in the JVM. You will be using a jar file that TMWs production tests have not been run against.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324">Eric Salemi</a>.</p>
<p>I have found a relatively simple solution.</p>
<p>If this is an issue with dependencies, we might fix the problem by installing groovy-all-2.4.6.jar at MATLAB startup. </p>
<p>On MATLAB R2016a (on Mac El Capitan for the test) this works if we load either:<br />
1. via a javaclasspath.txt file or<br />
2. by editing classpath.txt</p>
<p>Yair has written about this <a href="http://undocumentedmatlab.com/blog/static-java-classpath-hacks" rel="nofollow">here</a>.</p>
<p>So, adding Groovy on MATLAB&#8217;s static javaclasspath rather than the dynamic path resolves the problem.</p>
<p>An issue may remain with the resolution of dependent jars. If Groovy and MATLAB ship with different versions of a jar file, which gets loaded and which will get used? </p>
<p>Adding Groovy as the <em>first</em> entry in classpath.txt is probably the most robust &#8211; but the least attractive &#8211; solution. I&#8217;d suggest using a javaclasspath.txt file and only editing classpath.txt if problems arise. </p>
<p>Note that if a newer jar file is being loaded and used via Groovy there could be knock-on effects for any code running in the JVM. You will be using a jar file that TMWs production tests have not been run against.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372574</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Wed, 23 Mar 2016 17:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-372574</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324&quot;&gt;Eric Salemi&lt;/a&gt;.

Update: 

A quick check with JRE8 shows it does not fix the issue.

Groovy now uses Grape for dependency management:
http://docs.groovy-lang.org/latest/html/documentation/grape.html]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324">Eric Salemi</a>.</p>
<p>Update: </p>
<p>A quick check with JRE8 shows it does not fix the issue.</p>
<p>Groovy now uses Grape for dependency management:<br />
<a href="http://docs.groovy-lang.org/latest/html/documentation/grape.html" rel="nofollow ugc">http://docs.groovy-lang.org/latest/html/documentation/grape.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372402</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Sun, 20 Mar 2016 22:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-372402</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324&quot;&gt;Eric Salemi&lt;/a&gt;.

The code is fine and works in an external GroovyConsole session so the problem is running it within MATLAB.

Tracking down the problem would likely be difficult and time-consuming. 

I&#039;d probably start by swapping to an earlier groovy version.

Then maybe by swapping to the latest JRE 8 release for MATLAB because it&#039;s relatively simple to do and might (but only might) work. There are known issues with some earlier releases of Java 7 and groovy.

If not, a clash between versions of dependencies within groovy and the jars bundled with MATLAB might be the issue.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324">Eric Salemi</a>.</p>
<p>The code is fine and works in an external GroovyConsole session so the problem is running it within MATLAB.</p>
<p>Tracking down the problem would likely be difficult and time-consuming. </p>
<p>I&#8217;d probably start by swapping to an earlier groovy version.</p>
<p>Then maybe by swapping to the latest JRE 8 release for MATLAB because it&#8217;s relatively simple to do and might (but only might) work. There are known issues with some earlier releases of Java 7 and groovy.</p>
<p>If not, a clash between versions of dependencies within groovy and the jars bundled with MATLAB might be the issue.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Eric Salemi		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-372324</link>

		<dc:creator><![CDATA[Eric Salemi]]></dc:creator>
		<pubDate>Sat, 19 Mar 2016 15:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-372324</guid>

					<description><![CDATA[I&#039;m trying Groovy 2.4.6 in Matlab R2015b and everything looks fine until I try to create an instance of a class that was parsed dynamically.

Example:

&lt;pre lang=&quot;matlab&quot;&gt;
&gt;&gt; loader = groovy.lang.GroovyClassLoader();
&gt;&gt; clazz = loader.parseClass(&#039;class Foo { }&#039;);
&gt;&gt; object = clazz.newInstance();
One or more output arguments not assigned during call to &quot;newInstance&quot;.
&lt;/pre&gt;

What could be the problem?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying Groovy 2.4.6 in Matlab R2015b and everything looks fine until I try to create an instance of a class that was parsed dynamically.</p>
<p>Example:</p>
<pre lang="matlab">
>> loader = groovy.lang.GroovyClassLoader();
>> clazz = loader.parseClass('class Foo { }');
>> object = clazz.newInstance();
One or more output arguments not assigned during call to "newInstance".
</pre>
<p>What could be the problem?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-130278</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Thu, 06 Dec 2012 09:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-130278</guid>

					<description><![CDATA[Note: Comments above about Groovy 2 no longer apply. MATLAB works fine with 2.0.5 - the latest release at the time of writing. The change occurred with 2.02 or 03.]]></description>
			<content:encoded><![CDATA[<p>Note: Comments above about Groovy 2 no longer apply. MATLAB works fine with 2.0.5 &#8211; the latest release at the time of writing. The change occurred with 2.02 or 03.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-94539</link>

		<dc:creator><![CDATA[Malcolm]]></dc:creator>
		<pubDate>Fri, 06 Jul 2012 09:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-94539</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-94414&quot;&gt;Donn Shull&lt;/a&gt;.

@Donn

There are two sets of jars for Groovy: the &quot;indy&quot; set is for the Java 7 feature users. AFAIK, the standard set should be OK back to Java 5.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-94414">Donn Shull</a>.</p>
<p>@Donn</p>
<p>There are two sets of jars for Groovy: the &#8220;indy&#8221; set is for the Java 7 feature users. AFAIK, the standard set should be OK back to Java 5.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Donn Shull		</title>
		<link>https://undocumentedmatlab.com/articles/using-groovy-in-matlab#comment-94414</link>

		<dc:creator><![CDATA[Donn Shull]]></dc:creator>
		<pubDate>Thu, 05 Jul 2012 18:39:20 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2988#comment-94414</guid>

					<description><![CDATA[Nice article.

It looks like Groovy 2.0 was implemented to take advantage of enhancements in Java 7 while MATLAB through R2012a uses Java 6. This may be why there is trouble using Groovy 2.0 with MATLAB.]]></description>
			<content:encoded><![CDATA[<p>Nice article.</p>
<p>It looks like Groovy 2.0 was implemented to take advantage of enhancements in Java 7 while MATLAB through R2012a uses Java 6. This may be why there is trouble using Groovy 2.0 with MATLAB.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
