<?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 JavaGD in Java applications</title>
	<atom:link href="http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/</link>
	<description>Java, R, Statistics, Algorithms and other stuff</description>
	<lastBuildDate>Thu, 20 Oct 2011 18:02:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Zoe</title>
		<link>http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/comment-page-1/#comment-3717</link>
		<dc:creator>Zoe</dc:creator>
		<pubDate>Thu, 20 Oct 2011 18:02:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm-forge.com/techblog/?p=316#comment-3717</guid>
		<description>Thanks for the helpful post. 
I am not very familar with R. I have just tried your example, it doesn&#039;t work on my PC (Windows). I am wondering if it is because of the way to environment variable in Windows should be different than the code in your example as following:
engine.eval(&quot;.setenv &lt;- if (exists(\&quot;Sys.setenv\&quot;)) Sys.setenv else Sys.putenv&quot;);
engine.eval(&quot;.setenv(\&quot;JAVAGD_CLASS_NAME\&quot;=\&quot;JavaGDExample\&quot;)&quot;);

How could I set the environment variable in PC?

Thanks a lot,
Zoe</description>
		<content:encoded><![CDATA[<p>Thanks for the helpful post.<br />
I am not very familar with R. I have just tried your example, it doesn&#8217;t work on my PC (Windows). I am wondering if it is because of the way to environment variable in Windows should be different than the code in your example as following:<br />
engine.eval(&#8220;.setenv &lt;- if (exists(\&quot;Sys.setenv\&quot;)) Sys.setenv else Sys.putenv&quot;);<br />
engine.eval(&quot;.setenv(\&quot;JAVAGD_CLASS_NAME\&quot;=\&quot;JavaGDExample\&quot;)&quot;);</p>
<p>How could I set the environment variable in PC?</p>
<p>Thanks a lot,<br />
Zoe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kornelius Rohmeyer</title>
		<link>http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/comment-page-1/#comment-3379</link>
		<dc:creator>Kornelius Rohmeyer</dc:creator>
		<pubDate>Thu, 08 Sep 2011 21:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm-forge.com/techblog/?p=316#comment-3379</guid>
		<description>Hi Michael, 
yes of course the extensibility is the goal! Of course you can just write a main method with the following lines and nothing else in the class:

&lt;code&gt;
Rengine engine = new Rengine(new String[] {&quot;--vanilla&quot;}, true, null);      
engine.eval(&quot;library(JavaGD)&quot;);
engine.eval(&quot;JavaGD()&quot;);
engine.eval(&quot;plot(rnorm(100))&quot;);
&lt;/code&gt;

But that&#039;s not the point.

Best regards, Kornelius.</description>
		<content:encoded><![CDATA[<p>Hi Michael,<br />
yes of course the extensibility is the goal! Of course you can just write a main method with the following lines and nothing else in the class:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Rengine engine = new Rengine(new String[] {&quot;--vanilla&quot;}, true, null); &nbsp; &nbsp; &nbsp;<br />
engine.eval(&quot;library(JavaGD)&quot;);<br />
engine.eval(&quot;JavaGD()&quot;);<br />
engine.eval(&quot;plot(rnorm(100))&quot;);</div></div>
<p>But that&#8217;s not the point.</p>
<p>Best regards, Kornelius.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Theobald</title>
		<link>http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/comment-page-1/#comment-3376</link>
		<dc:creator>Michael Theobald</dc:creator>
		<pubDate>Thu, 08 Sep 2011 19:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm-forge.com/techblog/?p=316#comment-3376</guid>
		<description>Eliminating the import statements for the java.awt and javax.swing classes as well as the doOpen() and doClose() methods and the WindowListener code makes no difference in the function of this class as published.  Only the code in the main() method appears to be used.  Therefore, in my opinion, the code example could either be made more complete or made shorter.

It does work!
Michael</description>
		<content:encoded><![CDATA[<p>Eliminating the import statements for the java.awt and javax.swing classes as well as the doOpen() and doClose() methods and the WindowListener code makes no difference in the function of this class as published.  Only the code in the main() method appears to be used.  Therefore, in my opinion, the code example could either be made more complete or made shorter.</p>
<p>It does work!<br />
Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kornelius Rohmeyer</title>
		<link>http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/comment-page-1/#comment-2893</link>
		<dc:creator>Kornelius Rohmeyer</dc:creator>
		<pubDate>Thu, 14 Jul 2011 10:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm-forge.com/techblog/?p=316#comment-2893</guid>
		<description>Dear Michelle, please try to add the directory where the file &lt;tt&gt;JavaGDExample.class&lt;/tt&gt; is found to the CLASSPATH. If you call &lt;tt&gt;java&lt;/tt&gt; directly in the directory, it is simply the following in the bash on unix machines:
&lt;tt&gt;export CLASSPATH=\$CLASSPATH:.&lt;/tt&gt;</description>
		<content:encoded><![CDATA[<p>Dear Michelle, please try to add the directory where the file <tt>JavaGDExample.class</tt> is found to the CLASSPATH. If you call <tt>java</tt> directly in the directory, it is simply the following in the bash on unix machines:<br />
<tt>export CLASSPATH=$CLASSPATH:.</tt></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michelle</title>
		<link>http://www.algorithm-forge.com/techblog/2010/07/using-javagd-in-java-applications/comment-page-1/#comment-2887</link>
		<dc:creator>Michelle</dc:creator>
		<pubDate>Wed, 13 Jul 2011 20:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm-forge.com/techblog/?p=316#comment-2887</guid>
		<description>Hi there,

Thanks for the helpful post.  When I run your example, I get this error:

Exception in thread &quot;Thread-1&quot; java.lang.NoClassDefFoundError: JavaGDExample
	at org.rosuda.JRI.Rengine.rniEval(Native Method)
	at org.rosuda.JRI.Rengine.eval(Rengine.java:549)
	at org.rosuda.JRI.Rengine.eval(Rengine.java:527)
	at gov.pnl.mpv.views.JavaGDExample.main(JavaGDExample.java:42)
Caused by: java.lang.ClassNotFoundException: JavaGDExample
	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)
	... 4 more

Do you have any suggestions?</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>Thanks for the helpful post.  When I run your example, I get this error:</p>
<p>Exception in thread &#8220;Thread-1&#8243; java.lang.NoClassDefFoundError: JavaGDExample<br />
	at org.rosuda.JRI.Rengine.rniEval(Native Method)<br />
	at org.rosuda.JRI.Rengine.eval(Rengine.java:549)<br />
	at org.rosuda.JRI.Rengine.eval(Rengine.java:527)<br />
	at gov.pnl.mpv.views.JavaGDExample.main(JavaGDExample.java:42)<br />
Caused by: java.lang.ClassNotFoundException: JavaGDExample<br />
	at java.net.URLClassLoader[latex cssclass="latex-inline"]1.run(URLClassLoader.java:202)<br />
	at java.security.AccessController.doPrivileged(Native Method)<br />
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br />
	at sun.misc.Launcher[/latex]AppClassLoader.loadClass(Launcher.java:301)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br />
	&#8230; 4 more</p>
<p>Do you have any suggestions?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

