<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gary Boone, PhD &#187; eclipse</title>
	<atom:link href="http://garyboone.com/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://garyboone.com</link>
	<description>Clippings, code snippets, and other searchable web notes</description>
	<lastBuildDate>Mon, 21 Jun 2010 20:42:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Scala Eclipse Plugin Error: Scala Signature</title>
		<link>http://garyboone.com/2009/06/scala-eclipse-plugin-error-scala-signature/</link>
		<comments>http://garyboone.com/2009/06/scala-eclipse-plugin-error-scala-signature/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 22:54:28 +0000</pubDate>
		<dc:creator>gary</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[configgy]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://garyboone.com/2009/06/scala-eclipse-plugin-error-scala-signature/</guid>
		<description><![CDATA[Trying to start a program created with the eclipse Scala plugin, I saw an error that the main class couldn&#8217;t be found. That was cryptic, as there was a main. Stranger still, this is a program I had run successfully before. 
The first part of solving the problem was to look for clues in the [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">Trying to start a program created with the eclipse Scala plugin, I saw an error that the main class couldn&#8217;t be found. That was cryptic, as there was a main. Stranger still, this is a program I had run successfully before. </p>
<p style="clear: both">The first part of solving the problem was to look for clues in the <em>Problems</em> view. Opening it, I saw this:</p>
<blockquote style="clear: both"><p>error while loading Configgy, Scala signature Configgy has wrong version expected: 5.0 found: 4.1 in /Users/&#8230;</p>
</blockquote>
<p style="clear: both">So the first error was due to the compilation failing and not producing a main class that eclipse could launch.</p>
<p>After further digging, the version error turned out to be caused by a mismatch between the Scala version (2.7.5) I used to compile the Configgy library and the Scala version (2.8) that the eclipse plugin used to compile the rest of the program. I didn&#8217;t install Scala 2.8, so how could this occur? The Scala plugin installs its own version of Scala. Because I had selected the nightly build version of the plugin, the Scala versions drifted apart during one of the eclipse updates. </p>
<p style="clear: both">You can tell which version the eclipse Scala plugin uses by looking at the jar name in the <em>eclipse/plugins</em> directory. Eg, <em>scala.tools.nsc_2.75.final.jar</em></p>
<p style="clear: both">The solution was to revert to the stable, release version of the plugin. Do that by using this url in the eclipse <em>Software Updates</em> | <em>Available Software</em> | <em>Manage Sites&#8230;</em> list. </p>
<blockquote style="clear: both"><p>http://www.scala-lang.org/scala-eclipse-plugin</p>
</blockquote>
<p style="clear: both">More complete directions <a href="http://www.scala-lang.org/node/94">here</a>.</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://garyboone.com/2009/06/scala-eclipse-plugin-error-scala-signature/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Creating Single-file Runnable Jars in Scala with eclipse</title>
		<link>http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/</link>
		<comments>http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 06:47:02 +0000</pubDate>
		<dc:creator>gary</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[runnable jar]]></category>

		<guid isPermaLink="false">http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/</guid>
		<description><![CDATA[How do you create a single runnable jar that contains all the files it needs to run? This is one of those questions that should be easier to answer. Here&#8217;s how to do it in eclipse and NetBeans.
First, eclipse, following the post here:1. Create a Java class to run your Scala main:

package scala.loader;
import java.util.*;
public class [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">How do you create a single runnable jar that contains all the files it needs to run? This is one of those questions that should be easier to answer. Here&#8217;s how to do it in eclipse and NetBeans.</p>
<p style="clear: both">First, eclipse, following the post <a href="http://www.artima.com/forums/flat.jsp?forum=282&#038;thread=245933">here</a>:<br />1. Create a Java class to run your Scala main:</p>
<pre class="brush: java;">
package scala.loader;
import java.util.*;
public class ScalaEntryPoint
{
    public static void main(String[] args) {
    List&lt;string&gt; argList = new ArrayList&lt;string&gt;();
    argList.add(&quot;YourScalaObjectWithMain&quot;);
    for (String s : args) argList.add(s);
        scala.tools.nsc.MainGenericRunner.main(argList.toArray(new String[0]));
    }
}
</pre>
<p style="clear: both">Be sure to change <em>YourScalaObjectWithMain</em> to your class. Also, you&#8217;ll have to add the Scala tools jar to your projects classpath: <em>Project</em> | <em>Properties</em> | <em>Java Build Path</em> tab | <em>Libraries</em> tab | <em>Add External Jars&#8230;</em> button. Then pick the <em>scala.tools.nsc</em> file in your eclipse/plugins folder.</p>
<p>2. Create a Run Configuration to run the Java class. Check that it runs.</p>
<p style="clear: both">3. Then choose <em>File</em> | <em>Export&#8230;,</em> then <em>Java</em> | <em>Runnable JAR File</em>, then pick the Java run configuration to export and a destination. Optionally, you can save the ant XML file that does the export. Later, after some edits, you can rejar using</p>
<blockquote style="clear: both"><p>ant -f yourjarXMLfile.xml</p>
</blockquote>
<p style="clear: both">If you change your libraries, be sure to repeat the complete Export process to make sure your jar scrips includes the correct jars.</p>
<p style="clear: both">
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Scala Eclipse Plugin: got class?</title>
		<link>http://garyboone.com/2009/06/scala-eclipse-plugin-got-main/</link>
		<comments>http://garyboone.com/2009/06/scala-eclipse-plugin-got-main/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 22:35:10 +0000</pubDate>
		<dc:creator>gary</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://garyboone.com/2009/06/scala-eclipse-plugin-got-main/</guid>
		<description><![CDATA[The Scala Eclipse plugin is in development, so we can forgive little issues. One I keep running into is that programs sometimes can&#8217;t find themselves upon start. On the canonical hello-world program, I see:
Exception in thread &#8220;main&#8221; java.lang.NoClassDefFoundError: HelloWorldCaused by: java.lang.ClassNotFoundException: HelloWorld

So far, the only explanation I&#8217;ve found from searching the web is that the [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">The Scala Eclipse plugin is in development, so we can forgive little issues. One I keep running into is that programs sometimes can&#8217;t find themselves upon start. On the canonical hello-world program, I see:</p>
<blockquote style="clear: both"><p>Exception in thread &#8220;main&#8221; java.lang.NoClassDefFoundError: HelloWorld<br />Caused by: java.lang.ClassNotFoundException: HelloWorld</p>
</blockquote>
<p style="clear: both">So far, the only explanation I&#8217;ve found from searching the web is that the metadata is horked, so the workspace must be nuked from orbit, that being the only way to be sure. I&#8217;ve tried it and it works, but this approach is hardly practical for production coding.</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://garyboone.com/2009/06/scala-eclipse-plugin-got-main/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

